Skip to content

Commit abae017

Browse files
feat: add visibility column migration to replace is_public
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
1 parent b370c52 commit abae017

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

migrations/0006_add_visibility.sql

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-- Add visibility column (public, unlisted, private) to replace is_public
2+
ALTER TABLE configs ADD COLUMN visibility TEXT DEFAULT 'unlisted';
3+
4+
-- Migrate existing data: is_public=1 -> 'public', is_public=0 -> 'private'
5+
UPDATE configs SET visibility = 'public' WHERE is_public = 1;
6+
UPDATE configs SET visibility = 'private' WHERE is_public = 0;
7+
UPDATE configs SET visibility = 'unlisted' WHERE is_public IS NULL;

0 commit comments

Comments
 (0)