Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion rust/impls/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ pub(crate) const MIGRATIONS: &[&str] = &[
// We do not complain if the table already exists, as users of VSS could have already created this table
"CREATE TABLE IF NOT EXISTS vss_db (
user_token character varying(120) NOT NULL CHECK (user_token <> ''),
store_id character varying(120) NOT NULL CHECK (store_id <> ''),
store_id character varying(120) NOT NULL,
key character varying(600) NOT NULL,
value bytea NULL,
version bigint NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
last_updated_at TIMESTAMP WITH TIME ZONE,
PRIMARY KEY (user_token, store_id, key)
);",
"ALTER TABLE vss_db DROP CONSTRAINT IF EXISTS vss_db_store_id_check;",
];
#[cfg(test)]
pub(crate) const DUMMY_MIGRATION: &str = "SELECT 1 WHERE FALSE;";
2 changes: 1 addition & 1 deletion rust/impls/src/postgres/sql/v0_create_vss_db.sql
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CREATE TABLE vss_db (
user_token character varying(120) NOT NULL CHECK (user_token <> ''),
store_id character varying(120) NOT NULL CHECK (store_id <> ''),
store_id character varying(120) NOT NULL,
key character varying(600) NOT NULL,
value bytea NULL,
version bigint NOT NULL,
Expand Down