diff options
Diffstat (limited to 'migrations/auth/20221110_01_WtZ1I-create-resources-table.py')
-rw-r--r-- | migrations/auth/20221110_01_WtZ1I-create-resources-table.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/migrations/auth/20221110_01_WtZ1I-create-resources-table.py b/migrations/auth/20221110_01_WtZ1I-create-resources-table.py index f99d482..09ed891 100644 --- a/migrations/auth/20221110_01_WtZ1I-create-resources-table.py +++ b/migrations/auth/20221110_01_WtZ1I-create-resources-table.py @@ -11,9 +11,10 @@ steps = [ """ CREATE TABLE IF NOT EXISTS resources( group_id TEXT NOT NULL, - resource_id TEXT PRIMARY KEY, + resource_id TEXT NOT NULL, resource_name TEXT NOT NULL, resource_category_id TEXT NOT NULL, + PRIMARY KEY(group_id, resource_id), FOREIGN KEY(group_id) REFERENCES groups(group_id), FOREIGN KEY(resource_category_id) REFERENCES resource_categories(resource_category_id) ) WITHOUT ROWID |