VRFS-2795 json_store table

This commit is contained in:
Jonathan Kolyer 2015-02-23 06:25:04 +00:00
parent 83f3d56238
commit 0f756ba17e
2 changed files with 12 additions and 1 deletions

View File

@ -249,4 +249,5 @@ user_presences.sql
discard_scores_optimized.sql
alter_type_columns.sql
user_presences_rename.sql
add_genre_type.sql
add_genre_type.sql
musician_search.sql

10
db/up/musician_search.sql Normal file
View File

@ -0,0 +1,10 @@
CREATE TABLE json_stores (
id VARCHAR(64) PRIMARY KEY DEFAULT uuid_generate_v4(),
user_id VARCHAR(64) REFERENCES users(id) ON DELETE CASCADE,
foreign_key1_id VARCHAR(64),
data_blob JSON NOT NULL DEFAULT '{}',
type VARCHAR(128)
);
CREATE INDEX user_idx ON json_stores(user_id);
CREATE INDEX foreign_key1_idx ON json_stores(foreign_key1_id);