Files
georm/migrations/20250609181248_composite-key.up.sql

8 lines
207 B
SQL
Raw Permalink Normal View History

-- Add up migration script here
CREATE TABLE UserRoles (
user_id INTEGER NOT NULL,
role_id INTEGER NOT NULL,
assigned_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
PRIMARY KEY (user_id, role_id)
);