| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- CREATE TABLE `accounts` (
- `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 NOT NULL,
- `updated_at` integer NOT NULL,
- FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
- );
- --> statement-breakpoint
- CREATE TABLE `sessions` (
- `id` text PRIMARY KEY NOT NULL,
- `expires_at` integer NOT NULL,
- `token` text NOT NULL,
- `created_at` integer NOT NULL,
- `updated_at` integer NOT NULL,
- `ip_address` text,
- `user_agent` text,
- `user_id` text NOT NULL,
- `timezone` text,
- `city` text,
- `country` text,
- `region` text,
- `region_code` text,
- `colo` text,
- `latitude` text,
- `longitude` text,
- FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
- );
- --> statement-breakpoint
- CREATE UNIQUE INDEX `sessions_token_unique` ON `sessions` (`token`);--> statement-breakpoint
- CREATE TABLE `users` (
- `id` text PRIMARY KEY NOT NULL,
- `name` text NOT NULL,
- `email` text NOT NULL,
- `email_verified` integer NOT NULL,
- `image` text,
- `created_at` integer NOT NULL,
- `updated_at` integer NOT NULL,
- `is_anonymous` integer
- );
- --> statement-breakpoint
- CREATE UNIQUE INDEX `users_email_unique` ON `users` (`email`);--> statement-breakpoint
- CREATE TABLE `verifications` (
- `id` text PRIMARY KEY NOT NULL,
- `identifier` text NOT NULL,
- `value` text NOT NULL,
- `expires_at` integer NOT NULL,
- `created_at` integer,
- `updated_at` integer
- );
|