This repository has been archived by the owner on Jan 2, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 574
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change studio ID type from UUID to integer (#938)
All uses of UUIDs to manage the `studios` table have been switched to a plain `INTEGER` as a primary key. **Warning**: This will drop the current studio tables. Given that a core ID was changed and the feature is not yet released, we just clear them instead of a more complex migration.
- Loading branch information
1 parent
b56b4e9
commit 23156dd
Showing
4 changed files
with
119 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
DROP TABLE studios; | ||
DROP TABLE studio_snapshots; | ||
|
||
-- Identical to before, except we change the primary key to be of type `INTEGER`. | ||
CREATE TABLE studios ( | ||
id INTEGER PRIMARY KEY, | ||
name TEXT NOT NULL, | ||
user_id TEXT NOT NULL | ||
); | ||
|
||
-- Identical to before, except we change the `studio_id` column to be of type `INTEGER`. | ||
CREATE TABLE studio_snapshots ( | ||
id INTEGER PRIMARY KEY, | ||
studio_id INTEGER NOT NULL REFERENCES studios(id) ON DELETE CASCADE, | ||
|
||
modified_at DATETIME NOT NULL DEFAULT (datetime('now')), | ||
|
||
-- JSON serialized fields | ||
context TEXT NOT NULL, | ||
messages TEXT NOT NULL | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters