10 lines
425 B
SQL
10 lines
425 B
SQL
CREATE TABLE `image_to_user` (
|
|
`user_id` integer PRIMARY KEY NOT NULL,
|
|
`image_name` text NOT NULL,
|
|
`created_on` integer DEFAULT CURRENT_TIMESTAMP,
|
|
FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE no action
|
|
);
|
|
--> statement-breakpoint
|
|
DROP TABLE `phone_tokens`;--> statement-breakpoint
|
|
ALTER TABLE users ADD `image` text;--> statement-breakpoint
|
|
CREATE INDEX `image_idx` ON `users` (`image`); |