mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-07 10:31:46 +00:00
migration for user feature flags
This commit is contained in:
1 parent
4147c7d9a0
commit
c85e774948
3 files changed
+24
No files matched your search
@@ -0,0 +1,5 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE users DROP COLUMN maybe_feature_flags;
|
||||
@@ -0,0 +1,7 @@
|
||||
-- noinspection SqlDialectInspectionForFile
|
||||
-- noinspection SqlNoDataSourceInspectionForFile
|
||||
-- noinspection SqlResolveForFile
|
||||
|
||||
ALTER TABLE users
|
||||
ADD COLUMN maybe_feature_flags VARCHAR(255) DEFAULT NULL
|
||||
AFTER user_role_slug;
|
||||
@@ -22,6 +22,18 @@ CREATE TABLE users (
|
||||
-- The role assigned to the user confers permissions.
|
||||
user_role_slug VARCHAR(16) NOT NULL,
|
||||
|
||||
-- An optional comma separated list of flags for user accounts
|
||||
-- If a user has a flag, then they're enabled for that given feature.
|
||||
-- There are better ways to do this, but this hack will do for now.
|
||||
-- This should replace `can_access_studio`.
|
||||
--
|
||||
-- Possible flag values (multiple is okay) :
|
||||
-- - "explore_media"
|
||||
-- - "studio"
|
||||
maybe_feature_flags VARCHAR(255) DEFAULT NULL,
|
||||
|
||||
-- DEPRECATED
|
||||
-- TODO(bt, 2024-03-05): Remove after new flags are in place.
|
||||
-- Rollout flag for Storyteller Studio
|
||||
-- Default to false until rollout is 100%, then remove the column.
|
||||
can_access_studio BOOLEAN NOT NULL DEFAULT false,
|
||||
|
||||
Reference in new issue
Block a user