Refactor database schema and update scraping logic for One Piece characters and arcs
- Updated database schema to include French names and adjusted field names for consistency. - Modified scraping script to fetch and store French names for arcs and characters. - Improved API calls to handle redirects and fetch additional data for characters. - Enhanced data extraction methods for character attributes and devil fruits. - Cleaned up code for better readability and maintainability.
This commit is contained in:
@@ -1,156 +0,0 @@
|
||||
CREATE TABLE `arc` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`startChapter` integer NOT NULL,
|
||||
`endChapter` integer,
|
||||
`url` text
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `character` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`gender` text,
|
||||
`age` integer,
|
||||
`affiliations` text,
|
||||
`devilFruitId` text,
|
||||
`hakiObservation` integer DEFAULT false,
|
||||
`hakiArmament` integer DEFAULT false,
|
||||
`hakiConqueror` integer DEFAULT false,
|
||||
`bounty` integer DEFAULT 0,
|
||||
`height` real,
|
||||
`origin` text,
|
||||
`firstAppearance` integer NOT NULL,
|
||||
`pictureUrl` text,
|
||||
`epithets` text,
|
||||
`status` text,
|
||||
`arcId` text,
|
||||
`url` text,
|
||||
`isInDailyMode` integer DEFAULT true,
|
||||
FOREIGN KEY (`devilFruitId`) REFERENCES `devilFruit`(`id`) ON UPDATE no action ON DELETE no action,
|
||||
FOREIGN KEY (`arcId`) REFERENCES `arc`(`id`) ON UPDATE no action ON DELETE no action
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `characterHistory` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`characterId` text,
|
||||
`date` text,
|
||||
`won` integer DEFAULT 0 NOT NULL,
|
||||
`createdAt` integer NOT NULL,
|
||||
`updatedAt` integer NOT NULL,
|
||||
FOREIGN KEY (`characterId`) REFERENCES `character`(`id`) ON UPDATE no action ON DELETE no action
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `characterOverride` (
|
||||
`characterId` text PRIMARY KEY NOT NULL,
|
||||
`name` text,
|
||||
`gender` text,
|
||||
`age` integer,
|
||||
`affiliations` text,
|
||||
`devilFruitId` text,
|
||||
`hakiObservation` integer,
|
||||
`hakiArmament` integer,
|
||||
`hakiConqueror` integer,
|
||||
`bounty` integer,
|
||||
`height` real,
|
||||
`origin` text,
|
||||
`firstAppearance` integer NOT NULL,
|
||||
`pictureUrl` text,
|
||||
`epithets` text,
|
||||
`status` text,
|
||||
`arcId` text,
|
||||
`url` text,
|
||||
`notes` text,
|
||||
FOREIGN KEY (`characterId`) REFERENCES `character`(`id`) ON UPDATE no action ON DELETE no action,
|
||||
FOREIGN KEY (`devilFruitId`) REFERENCES `devilFruit`(`id`) ON UPDATE no action ON DELETE no action,
|
||||
FOREIGN KEY (`arcId`) REFERENCES `arc`(`id`) ON UPDATE no action ON DELETE no action
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `characterScrapeValidation` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`gender` text,
|
||||
`age` integer,
|
||||
`affiliations` text,
|
||||
`devilFruitId` text,
|
||||
`hakiObservation` integer DEFAULT false,
|
||||
`hakiArmament` integer DEFAULT false,
|
||||
`hakiConqueror` integer DEFAULT false,
|
||||
`bounty` integer,
|
||||
`height` real,
|
||||
`origin` text,
|
||||
`firstAppearance` integer NOT NULL,
|
||||
`pictureUrl` text,
|
||||
`epithets` text,
|
||||
`status` text,
|
||||
`arcId` text,
|
||||
`url` text,
|
||||
FOREIGN KEY (`devilFruitId`) REFERENCES `devilFruit`(`id`) ON UPDATE no action ON DELETE no action,
|
||||
FOREIGN KEY (`arcId`) REFERENCES `arc`(`id`) ON UPDATE no action ON DELETE no action
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `config` (
|
||||
`key` text PRIMARY KEY NOT NULL,
|
||||
`value` text
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `devilFruit` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`type` text,
|
||||
`url` text
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX `devilFruit_name_unique` ON `devilFruit` (`name`);--> statement-breakpoint
|
||||
CREATE TABLE `account` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`account_id` text NOT NULL,
|
||||
`provider_id` text NOT NULL,
|
||||
`user_id` text NOT NULL,
|
||||
`access_token` text,
|
||||
`refresh_token` text,
|
||||
`id_token` text,
|
||||
`access_token_expires_at` integer,
|
||||
`refresh_token_expires_at` integer,
|
||||
`scope` text,
|
||||
`password` text,
|
||||
`created_at` integer DEFAULT (cast(unixepoch('subsecond') * 1000 as integer)) NOT NULL,
|
||||
`updated_at` integer NOT NULL,
|
||||
FOREIGN KEY (`user_id`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE INDEX `account_userId_idx` ON `account` (`user_id`);--> statement-breakpoint
|
||||
CREATE TABLE `session` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`expires_at` integer NOT NULL,
|
||||
`token` text NOT NULL,
|
||||
`created_at` integer DEFAULT (cast(unixepoch('subsecond') * 1000 as integer)) NOT NULL,
|
||||
`updated_at` integer NOT NULL,
|
||||
`ip_address` text,
|
||||
`user_agent` text,
|
||||
`user_id` text NOT NULL,
|
||||
FOREIGN KEY (`user_id`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX `session_token_unique` ON `session` (`token`);--> statement-breakpoint
|
||||
CREATE INDEX `session_userId_idx` ON `session` (`user_id`);--> statement-breakpoint
|
||||
CREATE TABLE `user` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`email` text NOT NULL,
|
||||
`email_verified` integer DEFAULT false NOT NULL,
|
||||
`image` text,
|
||||
`created_at` integer DEFAULT (cast(unixepoch('subsecond') * 1000 as integer)) NOT NULL,
|
||||
`updated_at` integer DEFAULT (cast(unixepoch('subsecond') * 1000 as integer)) NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX `user_email_unique` ON `user` (`email`);--> statement-breakpoint
|
||||
CREATE TABLE `verification` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`identifier` text NOT NULL,
|
||||
`value` text NOT NULL,
|
||||
`expires_at` integer NOT NULL,
|
||||
`created_at` integer DEFAULT (cast(unixepoch('subsecond') * 1000 as integer)) NOT NULL,
|
||||
`updated_at` integer DEFAULT (cast(unixepoch('subsecond') * 1000 as integer)) NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE INDEX `verification_identifier_idx` ON `verification` (`identifier`);
|
||||
194
drizzle/0000_keen_rockslide.sql
Normal file
194
drizzle/0000_keen_rockslide.sql
Normal file
@@ -0,0 +1,194 @@
|
||||
CREATE TABLE `arc` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`fr_name` text,
|
||||
`start_chapter` integer NOT NULL,
|
||||
`end_chapter` integer,
|
||||
`url` text
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `character` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`fr_name` text,
|
||||
`gender` text,
|
||||
`age` integer,
|
||||
`affiliations` text,
|
||||
`devil_fruit_id` text,
|
||||
`haki_observation` integer DEFAULT false,
|
||||
`haki_armament` integer DEFAULT false,
|
||||
`haki_conqueror` integer DEFAULT false,
|
||||
`bounty` integer DEFAULT 0,
|
||||
`height` real,
|
||||
`origin` text,
|
||||
`fr_origin` text,
|
||||
`first_appearance` integer NOT NULL,
|
||||
`picture_url` text,
|
||||
`epithets` text,
|
||||
`fr_epithets` text,
|
||||
`status` text,
|
||||
`arc_id` text,
|
||||
`url` text,
|
||||
`fr_url` text,
|
||||
`is_in_daily_mode` integer DEFAULT false,
|
||||
FOREIGN KEY (`devil_fruit_id`) REFERENCES `devil_fruit`(`id`) ON UPDATE no action ON DELETE no action,
|
||||
FOREIGN KEY (`arc_id`) REFERENCES `arc`(`id`) ON UPDATE no action ON DELETE set null
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `character_history` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`character_id` text,
|
||||
`date` integer NOT NULL,
|
||||
`won` integer DEFAULT 0 NOT NULL,
|
||||
`created_at` integer NOT NULL,
|
||||
`updated_at` integer NOT NULL,
|
||||
FOREIGN KEY (`character_id`) REFERENCES `character`(`id`) ON UPDATE no action ON DELETE cascade
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX `character_history_date_unique` ON `character_history` (`date`);--> statement-breakpoint
|
||||
CREATE TABLE `character_override` (
|
||||
`character_id` text PRIMARY KEY NOT NULL,
|
||||
`name` text,
|
||||
`gender` text,
|
||||
`age` integer,
|
||||
`affiliations` text,
|
||||
`devil_fruit_id` text,
|
||||
`haki_observation` integer,
|
||||
`haki_armament` integer,
|
||||
`haki_conqueror` integer,
|
||||
`bounty` integer,
|
||||
`height` real,
|
||||
`origin` text,
|
||||
`first_appearance` integer,
|
||||
`picture_url` text,
|
||||
`epithets` text,
|
||||
`status` text,
|
||||
`arc_id` text,
|
||||
`url` text,
|
||||
`fr_url` text,
|
||||
`notes` text,
|
||||
FOREIGN KEY (`character_id`) REFERENCES `character`(`id`) ON UPDATE no action ON DELETE cascade,
|
||||
FOREIGN KEY (`devil_fruit_id`) REFERENCES `devil_fruit`(`id`) ON UPDATE no action ON DELETE set null,
|
||||
FOREIGN KEY (`arc_id`) REFERENCES `arc`(`id`) ON UPDATE no action ON DELETE set null
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `character_scrape_validation` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`fr_name` text,
|
||||
`gender` text,
|
||||
`age` integer,
|
||||
`affiliations` text,
|
||||
`devil_fruit_id` text,
|
||||
`haki_observation` integer DEFAULT false,
|
||||
`haki_armament` integer DEFAULT false,
|
||||
`haki_conqueror` integer DEFAULT false,
|
||||
`bounty` integer,
|
||||
`height` real,
|
||||
`origin` text,
|
||||
`fr_origin` text,
|
||||
`first_appearance` integer NOT NULL,
|
||||
`picture_url` text,
|
||||
`epithets` text,
|
||||
`fr_epithets` text,
|
||||
`status` text,
|
||||
`arc_id` text,
|
||||
`url` text,
|
||||
`fr_url` text,
|
||||
FOREIGN KEY (`devil_fruit_id`) REFERENCES `devil_fruit`(`id`) ON UPDATE no action ON DELETE set null,
|
||||
FOREIGN KEY (`arc_id`) REFERENCES `arc`(`id`) ON UPDATE no action ON DELETE set null
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `config` (
|
||||
`key` text PRIMARY KEY NOT NULL,
|
||||
`value` text
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE `devil_fruit` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`type` text,
|
||||
`url` text
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX `devil_fruit_name_unique` ON `devil_fruit` (`name`);--> statement-breakpoint
|
||||
CREATE TABLE `friendship` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`requester_id` text NOT NULL,
|
||||
`addressee_id` text NOT NULL,
|
||||
`status` text DEFAULT 'pending' NOT NULL,
|
||||
`created_at` integer NOT NULL,
|
||||
`updated_at` integer NOT NULL,
|
||||
FOREIGN KEY (`requester_id`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade,
|
||||
FOREIGN KEY (`addressee_id`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX `friendship_requester_id_addressee_id_unique` ON `friendship` (`requester_id`,`addressee_id`);--> statement-breakpoint
|
||||
CREATE TABLE `user_character_history` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`user_id` text,
|
||||
`character_history_id` text,
|
||||
`try_count` integer NOT NULL,
|
||||
`tried_character_ids` text,
|
||||
`created_at` integer NOT NULL,
|
||||
FOREIGN KEY (`user_id`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade,
|
||||
FOREIGN KEY (`character_history_id`) REFERENCES `character_history`(`id`) ON UPDATE no action ON DELETE cascade
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX `user_character_history_user_id_character_history_id_unique` ON `user_character_history` (`user_id`,`character_history_id`);--> statement-breakpoint
|
||||
CREATE TABLE `account` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`account_id` text NOT NULL,
|
||||
`provider_id` text NOT NULL,
|
||||
`user_id` text NOT NULL,
|
||||
`access_token` text,
|
||||
`refresh_token` text,
|
||||
`id_token` text,
|
||||
`access_token_expires_at` integer,
|
||||
`refresh_token_expires_at` integer,
|
||||
`scope` text,
|
||||
`password` text,
|
||||
`created_at` integer DEFAULT (cast(unixepoch('subsecond') * 1000 as integer)) NOT NULL,
|
||||
`updated_at` integer NOT NULL,
|
||||
FOREIGN KEY (`user_id`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE INDEX `account_userId_idx` ON `account` (`user_id`);--> statement-breakpoint
|
||||
CREATE TABLE `session` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`expires_at` integer NOT NULL,
|
||||
`token` text NOT NULL,
|
||||
`created_at` integer DEFAULT (cast(unixepoch('subsecond') * 1000 as integer)) NOT NULL,
|
||||
`updated_at` integer NOT NULL,
|
||||
`ip_address` text,
|
||||
`user_agent` text,
|
||||
`user_id` text NOT NULL,
|
||||
FOREIGN KEY (`user_id`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX `session_token_unique` ON `session` (`token`);--> statement-breakpoint
|
||||
CREATE INDEX `session_userId_idx` ON `session` (`user_id`);--> statement-breakpoint
|
||||
CREATE TABLE `user` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`username` text NOT NULL,
|
||||
`email` text NOT NULL,
|
||||
`email_verified` integer DEFAULT false NOT NULL,
|
||||
`image` text,
|
||||
`is_admin` integer DEFAULT false NOT NULL,
|
||||
`created_at` integer DEFAULT (cast(unixepoch('subsecond') * 1000 as integer)) NOT NULL,
|
||||
`updated_at` integer DEFAULT (cast(unixepoch('subsecond') * 1000 as integer)) NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX `user_username_unique` ON `user` (`username`);--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX `user_email_unique` ON `user` (`email`);--> statement-breakpoint
|
||||
CREATE TABLE `verification` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`identifier` text NOT NULL,
|
||||
`value` text NOT NULL,
|
||||
`expires_at` integer NOT NULL,
|
||||
`created_at` integer DEFAULT (cast(unixepoch('subsecond') * 1000 as integer)) NOT NULL,
|
||||
`updated_at` integer DEFAULT (cast(unixepoch('subsecond') * 1000 as integer)) NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE INDEX `verification_identifier_idx` ON `verification` (`identifier`);
|
||||
@@ -1,30 +0,0 @@
|
||||
PRAGMA foreign_keys=OFF;--> statement-breakpoint
|
||||
CREATE TABLE `__new_characterOverride` (
|
||||
`characterId` text PRIMARY KEY NOT NULL,
|
||||
`name` text,
|
||||
`gender` text,
|
||||
`age` integer,
|
||||
`affiliations` text,
|
||||
`devilFruitId` text,
|
||||
`hakiObservation` integer,
|
||||
`hakiArmament` integer,
|
||||
`hakiConqueror` integer,
|
||||
`bounty` integer,
|
||||
`height` real,
|
||||
`origin` text,
|
||||
`firstAppearance` integer,
|
||||
`pictureUrl` text,
|
||||
`epithets` text,
|
||||
`status` text,
|
||||
`arcId` text,
|
||||
`url` text,
|
||||
`notes` text,
|
||||
FOREIGN KEY (`characterId`) REFERENCES `character`(`id`) ON UPDATE no action ON DELETE no action,
|
||||
FOREIGN KEY (`devilFruitId`) REFERENCES `devilFruit`(`id`) ON UPDATE no action ON DELETE no action,
|
||||
FOREIGN KEY (`arcId`) REFERENCES `arc`(`id`) ON UPDATE no action ON DELETE no action
|
||||
);
|
||||
--> statement-breakpoint
|
||||
INSERT INTO `__new_characterOverride`("characterId", "name", "gender", "age", "affiliations", "devilFruitId", "hakiObservation", "hakiArmament", "hakiConqueror", "bounty", "height", "origin", "firstAppearance", "pictureUrl", "epithets", "status", "arcId", "url", "notes") SELECT "characterId", "name", "gender", "age", "affiliations", "devilFruitId", "hakiObservation", "hakiArmament", "hakiConqueror", "bounty", "height", "origin", "firstAppearance", "pictureUrl", "epithets", "status", "arcId", "url", "notes" FROM `characterOverride`;--> statement-breakpoint
|
||||
DROP TABLE `characterOverride`;--> statement-breakpoint
|
||||
ALTER TABLE `__new_characterOverride` RENAME TO `characterOverride`;--> statement-breakpoint
|
||||
PRAGMA foreign_keys=ON;
|
||||
@@ -1 +0,0 @@
|
||||
ALTER TABLE `user` ADD `is_admin` integer DEFAULT false NOT NULL;
|
||||
@@ -1,16 +0,0 @@
|
||||
PRAGMA foreign_keys=OFF;--> statement-breakpoint
|
||||
CREATE TABLE `__new_characterHistory` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`characterId` text,
|
||||
`date` integer NOT NULL,
|
||||
`won` integer DEFAULT 0 NOT NULL,
|
||||
`createdAt` integer NOT NULL,
|
||||
`updatedAt` integer NOT NULL,
|
||||
FOREIGN KEY (`characterId`) REFERENCES `character`(`id`) ON UPDATE no action ON DELETE no action
|
||||
);
|
||||
--> statement-breakpoint
|
||||
INSERT INTO `__new_characterHistory`("id", "characterId", "date", "won", "createdAt", "updatedAt") SELECT "id", "characterId", "date", "won", "createdAt", "updatedAt" FROM `characterHistory`;--> statement-breakpoint
|
||||
DROP TABLE `characterHistory`;--> statement-breakpoint
|
||||
ALTER TABLE `__new_characterHistory` RENAME TO `characterHistory`;--> statement-breakpoint
|
||||
PRAGMA foreign_keys=ON;--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX `characterHistory_date_unique` ON `characterHistory` (`date`);
|
||||
@@ -1,9 +0,0 @@
|
||||
CREATE TABLE `userCharacterHistory` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`userId` text,
|
||||
`characterId` 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 (`characterId`) REFERENCES `character`(`id`) ON UPDATE no action ON DELETE no action
|
||||
);
|
||||
@@ -1,15 +0,0 @@
|
||||
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;
|
||||
@@ -1 +0,0 @@
|
||||
CREATE UNIQUE INDEX `userCharacterHistory_userId_characterHistoryId_unique` ON `userCharacterHistory` (`userId`,`characterHistoryId`);
|
||||
@@ -1,29 +0,0 @@
|
||||
PRAGMA foreign_keys=OFF;--> statement-breakpoint
|
||||
CREATE TABLE `__new_character` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`gender` text,
|
||||
`age` integer,
|
||||
`affiliations` text,
|
||||
`devilFruitId` text,
|
||||
`hakiObservation` integer DEFAULT false,
|
||||
`hakiArmament` integer DEFAULT false,
|
||||
`hakiConqueror` integer DEFAULT false,
|
||||
`bounty` integer DEFAULT 0,
|
||||
`height` real,
|
||||
`origin` text,
|
||||
`firstAppearance` integer NOT NULL,
|
||||
`pictureUrl` text,
|
||||
`epithets` text,
|
||||
`status` text,
|
||||
`arcId` text,
|
||||
`url` text,
|
||||
`isInDailyMode` integer DEFAULT false,
|
||||
FOREIGN KEY (`devilFruitId`) REFERENCES `devilFruit`(`id`) ON UPDATE no action ON DELETE no action,
|
||||
FOREIGN KEY (`arcId`) REFERENCES `arc`(`id`) ON UPDATE no action ON DELETE no action
|
||||
);
|
||||
--> statement-breakpoint
|
||||
INSERT INTO `__new_character`("id", "name", "gender", "age", "affiliations", "devilFruitId", "hakiObservation", "hakiArmament", "hakiConqueror", "bounty", "height", "origin", "firstAppearance", "pictureUrl", "epithets", "status", "arcId", "url", "isInDailyMode") SELECT "id", "name", "gender", "age", "affiliations", "devilFruitId", "hakiObservation", "hakiArmament", "hakiConqueror", "bounty", "height", "origin", "firstAppearance", "pictureUrl", "epithets", "status", "arcId", "url", "isInDailyMode" FROM `character`;--> statement-breakpoint
|
||||
DROP TABLE `character`;--> statement-breakpoint
|
||||
ALTER TABLE `__new_character` RENAME TO `character`;--> statement-breakpoint
|
||||
PRAGMA foreign_keys=ON;
|
||||
@@ -1,12 +0,0 @@
|
||||
CREATE TABLE `friendship` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`requesterId` text NOT NULL,
|
||||
`addresseeId` text NOT NULL,
|
||||
`status` text DEFAULT 'pending' NOT NULL,
|
||||
`createdAt` integer NOT NULL,
|
||||
`updatedAt` integer NOT NULL,
|
||||
FOREIGN KEY (`requesterId`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade,
|
||||
FOREIGN KEY (`addresseeId`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX `friendship_requesterId_addresseeId_unique` ON `friendship` (`requesterId`,`addresseeId`);
|
||||
@@ -1,51 +0,0 @@
|
||||
PRAGMA foreign_keys=OFF;--> statement-breakpoint
|
||||
ALTER TABLE `user` ADD `username` text;--> statement-breakpoint
|
||||
UPDATE `user`
|
||||
SET `username` = `name`
|
||||
WHERE `username` IS NULL OR trim(`username`) = '';--> statement-breakpoint
|
||||
UPDATE `user`
|
||||
SET `username` = `username` || '_' || substr(`id`, 1, 6)
|
||||
WHERE `id` IN (
|
||||
SELECT u1.`id`
|
||||
FROM `user` u1
|
||||
JOIN `user` u2
|
||||
ON lower(u1.`username`) = lower(u2.`username`)
|
||||
AND u1.`id` > u2.`id`
|
||||
);--> statement-breakpoint
|
||||
CREATE TABLE `__new_user` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`username` text NOT NULL,
|
||||
`email` text NOT NULL,
|
||||
`email_verified` integer DEFAULT false NOT NULL,
|
||||
`image` text,
|
||||
`is_admin` integer DEFAULT false NOT NULL,
|
||||
`created_at` integer DEFAULT (cast(unixepoch('subsecond') * 1000 as integer)) NOT NULL,
|
||||
`updated_at` integer DEFAULT (cast(unixepoch('subsecond') * 1000 as integer)) NOT NULL
|
||||
);--> statement-breakpoint
|
||||
INSERT INTO `__new_user` (
|
||||
`id`,
|
||||
`name`,
|
||||
`username`,
|
||||
`email`,
|
||||
`email_verified`,
|
||||
`image`,
|
||||
`is_admin`,
|
||||
`created_at`,
|
||||
`updated_at`
|
||||
)
|
||||
SELECT
|
||||
`id`,
|
||||
`name`,
|
||||
`username`,
|
||||
`email`,
|
||||
`email_verified`,
|
||||
`image`,
|
||||
`is_admin`,
|
||||
`created_at`,
|
||||
`updated_at`
|
||||
FROM `user`;--> statement-breakpoint
|
||||
DROP TABLE `user`;--> statement-breakpoint
|
||||
ALTER TABLE `__new_user` RENAME TO `user`;--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX `user_username_unique` ON `user` (`username`);--> statement-breakpoint
|
||||
PRAGMA foreign_keys=ON;
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": "6",
|
||||
"dialect": "sqlite",
|
||||
"id": "d1237d76-8f1c-4721-b8dd-d31082ed7b9a",
|
||||
"id": "8ffd14bd-bf33-410f-9778-92bc1abc8938",
|
||||
"prevId": "00000000-0000-0000-0000-000000000000",
|
||||
"tables": {
|
||||
"arc": {
|
||||
@@ -21,15 +21,22 @@
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"startChapter": {
|
||||
"name": "startChapter",
|
||||
"fr_name": {
|
||||
"name": "fr_name",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"start_chapter": {
|
||||
"name": "start_chapter",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"endChapter": {
|
||||
"name": "endChapter",
|
||||
"end_chapter": {
|
||||
"name": "end_chapter",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
@@ -66,6 +73,13 @@
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"fr_name": {
|
||||
"name": "fr_name",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"gender": {
|
||||
"name": "gender",
|
||||
"type": "text",
|
||||
@@ -87,31 +101,31 @@
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"devilFruitId": {
|
||||
"name": "devilFruitId",
|
||||
"devil_fruit_id": {
|
||||
"name": "devil_fruit_id",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"hakiObservation": {
|
||||
"name": "hakiObservation",
|
||||
"haki_observation": {
|
||||
"name": "haki_observation",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false,
|
||||
"default": false
|
||||
},
|
||||
"hakiArmament": {
|
||||
"name": "hakiArmament",
|
||||
"haki_armament": {
|
||||
"name": "haki_armament",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false,
|
||||
"default": false
|
||||
},
|
||||
"hakiConqueror": {
|
||||
"name": "hakiConqueror",
|
||||
"haki_conqueror": {
|
||||
"name": "haki_conqueror",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
@@ -140,15 +154,22 @@
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"firstAppearance": {
|
||||
"name": "firstAppearance",
|
||||
"fr_origin": {
|
||||
"name": "fr_origin",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"first_appearance": {
|
||||
"name": "first_appearance",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"pictureUrl": {
|
||||
"name": "pictureUrl",
|
||||
"picture_url": {
|
||||
"name": "picture_url",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
@@ -161,6 +182,13 @@
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"fr_epithets": {
|
||||
"name": "fr_epithets",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"status": {
|
||||
"name": "status",
|
||||
"type": "text",
|
||||
@@ -168,8 +196,8 @@
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"arcId": {
|
||||
"name": "arcId",
|
||||
"arc_id": {
|
||||
"name": "arc_id",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
@@ -182,23 +210,30 @@
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"isInDailyMode": {
|
||||
"name": "isInDailyMode",
|
||||
"fr_url": {
|
||||
"name": "fr_url",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"is_in_daily_mode": {
|
||||
"name": "is_in_daily_mode",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false,
|
||||
"default": true
|
||||
"default": false
|
||||
}
|
||||
},
|
||||
"indexes": {},
|
||||
"foreignKeys": {
|
||||
"character_devilFruitId_devilFruit_id_fk": {
|
||||
"name": "character_devilFruitId_devilFruit_id_fk",
|
||||
"character_devil_fruit_id_devil_fruit_id_fk": {
|
||||
"name": "character_devil_fruit_id_devil_fruit_id_fk",
|
||||
"tableFrom": "character",
|
||||
"tableTo": "devilFruit",
|
||||
"tableTo": "devil_fruit",
|
||||
"columnsFrom": [
|
||||
"devilFruitId"
|
||||
"devil_fruit_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
@@ -206,17 +241,17 @@
|
||||
"onDelete": "no action",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
"character_arcId_arc_id_fk": {
|
||||
"name": "character_arcId_arc_id_fk",
|
||||
"character_arc_id_arc_id_fk": {
|
||||
"name": "character_arc_id_arc_id_fk",
|
||||
"tableFrom": "character",
|
||||
"tableTo": "arc",
|
||||
"columnsFrom": [
|
||||
"arcId"
|
||||
"arc_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"onDelete": "no action",
|
||||
"onDelete": "set null",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
},
|
||||
@@ -224,8 +259,8 @@
|
||||
"uniqueConstraints": {},
|
||||
"checkConstraints": {}
|
||||
},
|
||||
"characterHistory": {
|
||||
"name": "characterHistory",
|
||||
"character_history": {
|
||||
"name": "character_history",
|
||||
"columns": {
|
||||
"id": {
|
||||
"name": "id",
|
||||
@@ -234,8 +269,8 @@
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"characterId": {
|
||||
"name": "characterId",
|
||||
"character_id": {
|
||||
"name": "character_id",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
@@ -243,9 +278,9 @@
|
||||
},
|
||||
"date": {
|
||||
"name": "date",
|
||||
"type": "text",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"won": {
|
||||
@@ -256,34 +291,42 @@
|
||||
"autoincrement": false,
|
||||
"default": 0
|
||||
},
|
||||
"createdAt": {
|
||||
"name": "createdAt",
|
||||
"created_at": {
|
||||
"name": "created_at",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"updatedAt": {
|
||||
"name": "updatedAt",
|
||||
"updated_at": {
|
||||
"name": "updated_at",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
}
|
||||
},
|
||||
"indexes": {},
|
||||
"indexes": {
|
||||
"character_history_date_unique": {
|
||||
"name": "character_history_date_unique",
|
||||
"columns": [
|
||||
"date"
|
||||
],
|
||||
"isUnique": true
|
||||
}
|
||||
},
|
||||
"foreignKeys": {
|
||||
"characterHistory_characterId_character_id_fk": {
|
||||
"name": "characterHistory_characterId_character_id_fk",
|
||||
"tableFrom": "characterHistory",
|
||||
"character_history_character_id_character_id_fk": {
|
||||
"name": "character_history_character_id_character_id_fk",
|
||||
"tableFrom": "character_history",
|
||||
"tableTo": "character",
|
||||
"columnsFrom": [
|
||||
"characterId"
|
||||
"character_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"onDelete": "no action",
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
},
|
||||
@@ -291,11 +334,11 @@
|
||||
"uniqueConstraints": {},
|
||||
"checkConstraints": {}
|
||||
},
|
||||
"characterOverride": {
|
||||
"name": "characterOverride",
|
||||
"character_override": {
|
||||
"name": "character_override",
|
||||
"columns": {
|
||||
"characterId": {
|
||||
"name": "characterId",
|
||||
"character_id": {
|
||||
"name": "character_id",
|
||||
"type": "text",
|
||||
"primaryKey": true,
|
||||
"notNull": true,
|
||||
@@ -329,29 +372,29 @@
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"devilFruitId": {
|
||||
"name": "devilFruitId",
|
||||
"devil_fruit_id": {
|
||||
"name": "devil_fruit_id",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"hakiObservation": {
|
||||
"name": "hakiObservation",
|
||||
"haki_observation": {
|
||||
"name": "haki_observation",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"hakiArmament": {
|
||||
"name": "hakiArmament",
|
||||
"haki_armament": {
|
||||
"name": "haki_armament",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"hakiConqueror": {
|
||||
"name": "hakiConqueror",
|
||||
"haki_conqueror": {
|
||||
"name": "haki_conqueror",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
@@ -378,15 +421,15 @@
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"firstAppearance": {
|
||||
"name": "firstAppearance",
|
||||
"first_appearance": {
|
||||
"name": "first_appearance",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"pictureUrl": {
|
||||
"name": "pictureUrl",
|
||||
"picture_url": {
|
||||
"name": "picture_url",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
@@ -406,8 +449,8 @@
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"arcId": {
|
||||
"name": "arcId",
|
||||
"arc_id": {
|
||||
"name": "arc_id",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
@@ -420,6 +463,13 @@
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"fr_url": {
|
||||
"name": "fr_url",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"notes": {
|
||||
"name": "notes",
|
||||
"type": "text",
|
||||
@@ -430,43 +480,43 @@
|
||||
},
|
||||
"indexes": {},
|
||||
"foreignKeys": {
|
||||
"characterOverride_characterId_character_id_fk": {
|
||||
"name": "characterOverride_characterId_character_id_fk",
|
||||
"tableFrom": "characterOverride",
|
||||
"character_override_character_id_character_id_fk": {
|
||||
"name": "character_override_character_id_character_id_fk",
|
||||
"tableFrom": "character_override",
|
||||
"tableTo": "character",
|
||||
"columnsFrom": [
|
||||
"characterId"
|
||||
"character_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"onDelete": "no action",
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
"characterOverride_devilFruitId_devilFruit_id_fk": {
|
||||
"name": "characterOverride_devilFruitId_devilFruit_id_fk",
|
||||
"tableFrom": "characterOverride",
|
||||
"tableTo": "devilFruit",
|
||||
"character_override_devil_fruit_id_devil_fruit_id_fk": {
|
||||
"name": "character_override_devil_fruit_id_devil_fruit_id_fk",
|
||||
"tableFrom": "character_override",
|
||||
"tableTo": "devil_fruit",
|
||||
"columnsFrom": [
|
||||
"devilFruitId"
|
||||
"devil_fruit_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"onDelete": "no action",
|
||||
"onDelete": "set null",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
"characterOverride_arcId_arc_id_fk": {
|
||||
"name": "characterOverride_arcId_arc_id_fk",
|
||||
"tableFrom": "characterOverride",
|
||||
"character_override_arc_id_arc_id_fk": {
|
||||
"name": "character_override_arc_id_arc_id_fk",
|
||||
"tableFrom": "character_override",
|
||||
"tableTo": "arc",
|
||||
"columnsFrom": [
|
||||
"arcId"
|
||||
"arc_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"onDelete": "no action",
|
||||
"onDelete": "set null",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
},
|
||||
@@ -474,8 +524,8 @@
|
||||
"uniqueConstraints": {},
|
||||
"checkConstraints": {}
|
||||
},
|
||||
"characterScrapeValidation": {
|
||||
"name": "characterScrapeValidation",
|
||||
"character_scrape_validation": {
|
||||
"name": "character_scrape_validation",
|
||||
"columns": {
|
||||
"id": {
|
||||
"name": "id",
|
||||
@@ -491,6 +541,13 @@
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"fr_name": {
|
||||
"name": "fr_name",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"gender": {
|
||||
"name": "gender",
|
||||
"type": "text",
|
||||
@@ -512,31 +569,31 @@
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"devilFruitId": {
|
||||
"name": "devilFruitId",
|
||||
"devil_fruit_id": {
|
||||
"name": "devil_fruit_id",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"hakiObservation": {
|
||||
"name": "hakiObservation",
|
||||
"haki_observation": {
|
||||
"name": "haki_observation",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false,
|
||||
"default": false
|
||||
},
|
||||
"hakiArmament": {
|
||||
"name": "hakiArmament",
|
||||
"haki_armament": {
|
||||
"name": "haki_armament",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false,
|
||||
"default": false
|
||||
},
|
||||
"hakiConqueror": {
|
||||
"name": "hakiConqueror",
|
||||
"haki_conqueror": {
|
||||
"name": "haki_conqueror",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
@@ -564,15 +621,22 @@
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"firstAppearance": {
|
||||
"name": "firstAppearance",
|
||||
"fr_origin": {
|
||||
"name": "fr_origin",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"first_appearance": {
|
||||
"name": "first_appearance",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"pictureUrl": {
|
||||
"name": "pictureUrl",
|
||||
"picture_url": {
|
||||
"name": "picture_url",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
@@ -585,6 +649,13 @@
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"fr_epithets": {
|
||||
"name": "fr_epithets",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"status": {
|
||||
"name": "status",
|
||||
"type": "text",
|
||||
@@ -592,8 +663,8 @@
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"arcId": {
|
||||
"name": "arcId",
|
||||
"arc_id": {
|
||||
"name": "arc_id",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
@@ -605,34 +676,41 @@
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"fr_url": {
|
||||
"name": "fr_url",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
}
|
||||
},
|
||||
"indexes": {},
|
||||
"foreignKeys": {
|
||||
"characterScrapeValidation_devilFruitId_devilFruit_id_fk": {
|
||||
"name": "characterScrapeValidation_devilFruitId_devilFruit_id_fk",
|
||||
"tableFrom": "characterScrapeValidation",
|
||||
"tableTo": "devilFruit",
|
||||
"character_scrape_validation_devil_fruit_id_devil_fruit_id_fk": {
|
||||
"name": "character_scrape_validation_devil_fruit_id_devil_fruit_id_fk",
|
||||
"tableFrom": "character_scrape_validation",
|
||||
"tableTo": "devil_fruit",
|
||||
"columnsFrom": [
|
||||
"devilFruitId"
|
||||
"devil_fruit_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"onDelete": "no action",
|
||||
"onDelete": "set null",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
"characterScrapeValidation_arcId_arc_id_fk": {
|
||||
"name": "characterScrapeValidation_arcId_arc_id_fk",
|
||||
"tableFrom": "characterScrapeValidation",
|
||||
"character_scrape_validation_arc_id_arc_id_fk": {
|
||||
"name": "character_scrape_validation_arc_id_arc_id_fk",
|
||||
"tableFrom": "character_scrape_validation",
|
||||
"tableTo": "arc",
|
||||
"columnsFrom": [
|
||||
"arcId"
|
||||
"arc_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"onDelete": "no action",
|
||||
"onDelete": "set null",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
},
|
||||
@@ -664,8 +742,8 @@
|
||||
"uniqueConstraints": {},
|
||||
"checkConstraints": {}
|
||||
},
|
||||
"devilFruit": {
|
||||
"name": "devilFruit",
|
||||
"devil_fruit": {
|
||||
"name": "devil_fruit",
|
||||
"columns": {
|
||||
"id": {
|
||||
"name": "id",
|
||||
@@ -697,8 +775,8 @@
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"devilFruit_name_unique": {
|
||||
"name": "devilFruit_name_unique",
|
||||
"devil_fruit_name_unique": {
|
||||
"name": "devil_fruit_name_unique",
|
||||
"columns": [
|
||||
"name"
|
||||
],
|
||||
@@ -710,6 +788,183 @@
|
||||
"uniqueConstraints": {},
|
||||
"checkConstraints": {}
|
||||
},
|
||||
"friendship": {
|
||||
"name": "friendship",
|
||||
"columns": {
|
||||
"id": {
|
||||
"name": "id",
|
||||
"type": "text",
|
||||
"primaryKey": true,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"requester_id": {
|
||||
"name": "requester_id",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"addressee_id": {
|
||||
"name": "addressee_id",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"status": {
|
||||
"name": "status",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false,
|
||||
"default": "'pending'"
|
||||
},
|
||||
"created_at": {
|
||||
"name": "created_at",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"updated_at": {
|
||||
"name": "updated_at",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"friendship_requester_id_addressee_id_unique": {
|
||||
"name": "friendship_requester_id_addressee_id_unique",
|
||||
"columns": [
|
||||
"requester_id",
|
||||
"addressee_id"
|
||||
],
|
||||
"isUnique": true
|
||||
}
|
||||
},
|
||||
"foreignKeys": {
|
||||
"friendship_requester_id_user_id_fk": {
|
||||
"name": "friendship_requester_id_user_id_fk",
|
||||
"tableFrom": "friendship",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"requester_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
"friendship_addressee_id_user_id_fk": {
|
||||
"name": "friendship_addressee_id_user_id_fk",
|
||||
"tableFrom": "friendship",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"addressee_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
},
|
||||
"compositePrimaryKeys": {},
|
||||
"uniqueConstraints": {},
|
||||
"checkConstraints": {}
|
||||
},
|
||||
"user_character_history": {
|
||||
"name": "user_character_history",
|
||||
"columns": {
|
||||
"id": {
|
||||
"name": "id",
|
||||
"type": "text",
|
||||
"primaryKey": true,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"user_id": {
|
||||
"name": "user_id",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"character_history_id": {
|
||||
"name": "character_history_id",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"try_count": {
|
||||
"name": "try_count",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"tried_character_ids": {
|
||||
"name": "tried_character_ids",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"created_at": {
|
||||
"name": "created_at",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"user_character_history_user_id_character_history_id_unique": {
|
||||
"name": "user_character_history_user_id_character_history_id_unique",
|
||||
"columns": [
|
||||
"user_id",
|
||||
"character_history_id"
|
||||
],
|
||||
"isUnique": true
|
||||
}
|
||||
},
|
||||
"foreignKeys": {
|
||||
"user_character_history_user_id_user_id_fk": {
|
||||
"name": "user_character_history_user_id_user_id_fk",
|
||||
"tableFrom": "user_character_history",
|
||||
"tableTo": "user",
|
||||
"columnsFrom": [
|
||||
"user_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
},
|
||||
"user_character_history_character_history_id_character_history_id_fk": {
|
||||
"name": "user_character_history_character_history_id_character_history_id_fk",
|
||||
"tableFrom": "user_character_history",
|
||||
"tableTo": "character_history",
|
||||
"columnsFrom": [
|
||||
"character_history_id"
|
||||
],
|
||||
"columnsTo": [
|
||||
"id"
|
||||
],
|
||||
"onDelete": "cascade",
|
||||
"onUpdate": "no action"
|
||||
}
|
||||
},
|
||||
"compositePrimaryKeys": {},
|
||||
"uniqueConstraints": {},
|
||||
"checkConstraints": {}
|
||||
},
|
||||
"account": {
|
||||
"name": "account",
|
||||
"columns": {
|
||||
@@ -947,6 +1202,13 @@
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"username": {
|
||||
"name": "username",
|
||||
"type": "text",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false
|
||||
},
|
||||
"email": {
|
||||
"name": "email",
|
||||
"type": "text",
|
||||
@@ -969,6 +1231,14 @@
|
||||
"notNull": false,
|
||||
"autoincrement": false
|
||||
},
|
||||
"is_admin": {
|
||||
"name": "is_admin",
|
||||
"type": "integer",
|
||||
"primaryKey": false,
|
||||
"notNull": true,
|
||||
"autoincrement": false,
|
||||
"default": false
|
||||
},
|
||||
"created_at": {
|
||||
"name": "created_at",
|
||||
"type": "integer",
|
||||
@@ -987,6 +1257,13 @@
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
"user_username_unique": {
|
||||
"name": "user_username_unique",
|
||||
"columns": [
|
||||
"username"
|
||||
],
|
||||
"isUnique": true
|
||||
},
|
||||
"user_email_unique": {
|
||||
"name": "user_email_unique",
|
||||
"columns": [
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -5,71 +5,8 @@
|
||||
{
|
||||
"idx": 0,
|
||||
"version": "6",
|
||||
"when": 1772325597983,
|
||||
"tag": "0000_graceful_master_mold",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 1,
|
||||
"version": "6",
|
||||
"when": 1772383366179,
|
||||
"tag": "0001_nostalgic_hercules",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 2,
|
||||
"version": "6",
|
||||
"when": 1772390182445,
|
||||
"tag": "0002_large_gwen_stacy",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 3,
|
||||
"version": "6",
|
||||
"when": 1772449624450,
|
||||
"tag": "0003_wise_blonde_phantom",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 4,
|
||||
"version": "6",
|
||||
"when": 1772480377099,
|
||||
"tag": "0004_unique_lorna_dane",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 5,
|
||||
"version": "6",
|
||||
"when": 1772562012631,
|
||||
"tag": "0005_large_jane_foster",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 6,
|
||||
"version": "6",
|
||||
"when": 1772562364830,
|
||||
"tag": "0006_premium_mesmero",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 7,
|
||||
"version": "6",
|
||||
"when": 1772735982970,
|
||||
"tag": "0007_gray_shinko_yamashiro",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 8,
|
||||
"version": "6",
|
||||
"when": 1772821532270,
|
||||
"tag": "0008_skinny_warpath",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 9,
|
||||
"version": "6",
|
||||
"when": 1772822823122,
|
||||
"tag": "0009_true_gravity",
|
||||
"when": 1773447741334,
|
||||
"tag": "0000_keen_rockslide",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user