Skip to content

Commit

Permalink
Update timestamps to be iso8601
Browse files Browse the repository at this point in the history
  • Loading branch information
brettimus committed Dec 10, 2024
1 parent bbd3050 commit ee89c6d
Show file tree
Hide file tree
Showing 4 changed files with 526 additions and 5 deletions.
35 changes: 35 additions & 0 deletions api/drizzle/0021_woozy_inhumans.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
PRAGMA foreign_keys=OFF;--> statement-breakpoint
CREATE TABLE `__new_ai_request_logs` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`log` text NOT NULL,
`created_at` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL
);
--> statement-breakpoint
INSERT INTO `__new_ai_request_logs`("id", "log", "created_at") SELECT "id", "log", "created_at" FROM `ai_request_logs`;--> statement-breakpoint
DROP TABLE `ai_request_logs`;--> statement-breakpoint
ALTER TABLE `__new_ai_request_logs` RENAME TO `ai_request_logs`;--> statement-breakpoint
PRAGMA foreign_keys=ON;--> statement-breakpoint
CREATE TABLE `__new_settings` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`key` text NOT NULL,
`value` text DEFAULT '' NOT NULL,
`created_at` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL,
`updated_at` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL
);
--> statement-breakpoint
INSERT INTO `__new_settings`("id", "key", "value", "created_at", "updated_at") SELECT "id", "key", "value", "created_at", "updated_at" FROM `settings`;--> statement-breakpoint
DROP TABLE `settings`;--> statement-breakpoint
ALTER TABLE `__new_settings` RENAME TO `settings`;--> statement-breakpoint
CREATE UNIQUE INDEX `settings_key_unique` ON `settings` (`key`);--> statement-breakpoint
CREATE TABLE `__new_tokens` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`value` text NOT NULL,
`expires_at` text,
`created_at` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL,
`updated_at` text DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')) NOT NULL
);
--> statement-breakpoint
INSERT INTO `__new_tokens`("id", "value", "expires_at", "created_at", "updated_at") SELECT "id", "value", "expires_at", "created_at", "updated_at" FROM `tokens`;--> statement-breakpoint
DROP TABLE `tokens`;--> statement-breakpoint
ALTER TABLE `__new_tokens` RENAME TO `tokens`;--> statement-breakpoint
CREATE UNIQUE INDEX `tokens_value_unique` ON `tokens` (`value`);
Loading

0 comments on commit ee89c6d

Please sign in to comment.