SQL

CREATE TABLE `session`  (
  `id` text PRIMARY KEY,
  `expires_at` integer NOT NULL,
  `token` text NOT NULL UNIQUE,
  `created_at` integer NOT NULL,
  `updated_at` integer NOT NULL,
  `ip_address` text,
  `user_agent` text,
  `user_id` text NOT NULL,
  CONSTRAINT `fk_session_user_id_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `user`(`id`) ON DELETE CASCADE
)

+ Add column

Columns

Column Data type Allow null Primary key Actions
id TEXT Rename | Drop
expires_at INTEGER Rename | Drop
token TEXT Rename | Drop
created_at INTEGER Rename | Drop
updated_at INTEGER Rename | Drop
ip_address TEXT Rename | Drop
user_agent TEXT Rename | Drop
user_id TEXT Rename | Drop

Foreign Keys

Column Destination
user_id user.id

+ Add index

Indexes

Name Columns Unique SQL Drop?
sqlite_autoindex_session_1 id SQL
-- no sql found --
Drop
sqlite_autoindex_session_2 token SQL
-- no sql found --
Drop