github.com/icyphox/x@v0.0.355-0.20220311094250-029bd783e8b8/popx/stub/migrations/transactional/20191100000003000000_sessions.postgres.up.sql (about) 1 CREATE TABLE "sessions" ( 2 "id" UUID NOT NULL, 3 PRIMARY KEY("id"), 4 "issued_at" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, 5 "expires_at" timestamp NOT NULL, 6 "authenticated_at" timestamp NOT NULL, 7 "identity_id" UUID NOT NULL, 8 "created_at" timestamp NOT NULL, 9 "updated_at" timestamp NOT NULL, 10 FOREIGN KEY ("identity_id") REFERENCES "identities" ("id") ON DELETE cascade 11 );