diff options
-rw-r--r-- | pkg/database/migrations.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/database/migrations.go b/pkg/database/migrations.go index 7de255a..6a3d923 100644 --- a/pkg/database/migrations.go +++ b/pkg/database/migrations.go @@ -19,7 +19,7 @@ var allMigrations = []func(tx *sql.Tx) error{ last_login_at DATE DEFAULT NULL ); CREATE TABLE sessions ( - token TEXT NOT NULL UNIQUE, + token TEXT PRIMARY KEY, user_id INTEGER NOT NULL, created_at DATE DEFAULT (datetime('now')), FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE |