feat: add new snapshot for version 6 with updated schema and relationships
All checks were successful
Build Docker Image / build (push) Successful in 1m23s
All checks were successful
Build Docker Image / build (push) Successful in 1m23s
- Created a new snapshot file for version 6 of the database schema. - Added tables for arc, character, characterHistory, characterOverride, characterScrapeValidation, config, devilFruit, userCharacterHistory, account, session, user, and verification with appropriate columns and constraints. - Updated the journal to include new entries for version 6. - Modified the userCharacterHistory table to enforce unique constraints on userId and characterHistoryId. - Enhanced daily game logic to track user attempts and prevent duplicate entries for the same day.
This commit is contained in:
15
drizzle/0005_large_jane_foster.sql
Normal file
15
drizzle/0005_large_jane_foster.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
PRAGMA foreign_keys=OFF;--> statement-breakpoint
|
||||
CREATE TABLE `__new_userCharacterHistory` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`userId` text,
|
||||
`characterHistoryId` text,
|
||||
`tryCount` integer NOT NULL,
|
||||
`createdAt` integer NOT NULL,
|
||||
FOREIGN KEY (`userId`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE no action,
|
||||
FOREIGN KEY (`characterHistoryId`) REFERENCES `characterHistory`(`id`) ON UPDATE no action ON DELETE no action
|
||||
);
|
||||
--> statement-breakpoint
|
||||
INSERT INTO `__new_userCharacterHistory`("id", "userId", "characterHistoryId", "tryCount", "createdAt") SELECT "id", "userId", "characterId", "tryCount", "createdAt" FROM `userCharacterHistory`;--> statement-breakpoint
|
||||
DROP TABLE `userCharacterHistory`;--> statement-breakpoint
|
||||
ALTER TABLE `__new_userCharacterHistory` RENAME TO `userCharacterHistory`;--> statement-breakpoint
|
||||
PRAGMA foreign_keys=ON;
|
||||
Reference in New Issue
Block a user