datatbase schema provisioning

This commit is contained in:
2021-02-09 08:24:47 -08:00
parent d991dfdb0c
commit 7ff9b9d648
9 changed files with 17 additions and 23 deletions

0
scripts/initdb/create_db.sql Normal file → Executable file
View File

View File

@@ -1,15 +0,0 @@
#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname cic_meta <<-EOSQL
create table if not exists cic_meta.store (
id serial primary key not null,
owner_fingerprint text not null,
hash char(64) not null unique,
content text not null
);
create index if not exists idx_fp on store ((lower(owner_fingerprint)));
EOSQL