mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-29 21:33:54 +00:00
Co-authored-by: Kit Langton <kit.langton@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
18 lines
501 B
SQL
18 lines
501 B
SQL
CREATE TABLE `account` (
|
|
`id` text PRIMARY KEY,
|
|
`email` text NOT NULL,
|
|
`url` text NOT NULL,
|
|
`access_token` text NOT NULL,
|
|
`refresh_token` text NOT NULL,
|
|
`token_expiry` integer,
|
|
`selected_org_id` text,
|
|
`time_created` integer NOT NULL,
|
|
`time_updated` integer NOT NULL
|
|
);
|
|
--> statement-breakpoint
|
|
CREATE TABLE `account_state` (
|
|
`id` integer PRIMARY KEY NOT NULL,
|
|
`active_account_id` text,
|
|
FOREIGN KEY (`active_account_id`) REFERENCES `account`(`id`) ON UPDATE no action ON DELETE set null
|
|
);
|