From dbd3b240811cb095bc87136501ee846f7b0cb42b Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 8 Nov 2022 13:51:45 +0300 Subject: Add migration to create the groups table. --- .../auth/20221108_01_CoxYh-create-the-groups-table.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 migrations/auth/20221108_01_CoxYh-create-the-groups-table.py (limited to 'migrations') diff --git a/migrations/auth/20221108_01_CoxYh-create-the-groups-table.py b/migrations/auth/20221108_01_CoxYh-create-the-groups-table.py new file mode 100644 index 0000000..06491dd --- /dev/null +++ b/migrations/auth/20221108_01_CoxYh-create-the-groups-table.py @@ -0,0 +1,18 @@ +""" +Create the groups table +""" + +from yoyo import step + +__depends__ = {'20221103_02_sGrIs-create-user-credentials-table'} + +steps = [ + step( + """ + CREATE TABLE IF NOT EXISTS groups( + group_id TEXT PRIMARY KEY NOT NULL, + group_name TEXT NOT NULL + ) WITHOUT ROWID + """, + "DROP TABLE IF EXISTS groups") +] -- cgit v1.2.3