aboutsummaryrefslogtreecommitdiff
path: root/migrations/auth/20221208_01_sSdHz-add-public-column-to-resources-table.py
blob: 22380691473b376af9c0315a69b9a059d053c36c (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"""
Add 'public' column to 'resources' table
"""

from yoyo import step

__depends__ = {'20221206_01_BbeF9-create-group-user-roles-on-resources-table'}

steps = [
    step(
        """
        ALTER TABLE resources ADD COLUMN
            public INTEGER NOT NULL DEFAULT 0 CHECK (public=0 or public=1)
        """,
        "ALTER TABLE resources DROP COLUMN public")
]