-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: attempt to fix github actions to include postgres config
Signed-off-by: guacamole <gunjanwalecha@gmail.com>
- Loading branch information
Showing
2 changed files
with
35 additions
and
35 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 |
---|---|---|
@@ -1,46 +1,48 @@ | ||
|
||
CREATE TABLE "users" ( | ||
"id" uuid PRIMARY KEY, | ||
"is_active" boolean, | ||
"username" varchar NOT NULL UNIQUE, | ||
"email" varchar NOT NULL UNIQUE, | ||
"password" varchar, | ||
"created_at" timestamp, | ||
"updated_at" timestamp, | ||
"country_code" int | ||
"id" uuid PRIMARY KEY, | ||
"is_active" boolean, | ||
"username" varchar NOT NULL UNIQUE, | ||
"email" varchar NOT NULL UNIQUE, | ||
"password" varchar, | ||
"created_at" timestamp, | ||
"updated_at" timestamp, | ||
"country_code" int | ||
); | ||
|
||
CREATE TABLE "config" ( | ||
"uuid" uuid UNIQUE NOT NULL, | ||
"namespace" text, | ||
"reference" text, | ||
"digest" text UNIQUE NOT NULL, | ||
"sky_link" text, | ||
"media_type" text, | ||
"layers" text[], | ||
"size" int, | ||
PRIMARY KEY (namespace,reference) | ||
"uuid" uuid UNIQUE NOT NULL, | ||
"namespace" text NOT NULL, | ||
"reference" text NOT NULL, | ||
"digest" text NOT NULL, | ||
"sky_link" text, | ||
"media_type" text, | ||
"layers" text[], | ||
"size" int, | ||
PRIMARY KEY(namespace, reference) | ||
); | ||
|
||
CREATE TABLE "blob" ( | ||
"uuid" uuid, | ||
"digest" text PRIMARY KEY, | ||
"sky_link" text, | ||
"start_range" int, | ||
"end_range" int | ||
"uuid" uuid, | ||
"digest" text PRIMARY KEY, | ||
"sky_link" text, | ||
"start_range" int, | ||
"end_range" int | ||
); | ||
|
||
CREATE TABLE "layer" ( | ||
"uuid" uuid PRIMARY KEY, | ||
"digest" text UNIQUE NOT NULL, | ||
"blob_ids" text[], | ||
"media_type" text, | ||
"sky_link" text, | ||
"size" int | ||
"uuid" uuid PRIMARY KEY, | ||
"digest" text UNIQUE NOT NULL, | ||
"blob_ids" text[], | ||
"media_type" text, | ||
"sky_link" text, | ||
"size" int | ||
); | ||
|
||
CREATE TABLE "image_manifest" ( | ||
"uuid" uuid PRIMARY KEY, | ||
"namespace" text UNIQUE NOT NULL, | ||
"media_type" text, | ||
"schema_version" int | ||
"uuid" uuid PRIMARY KEY, | ||
"namespace" text UNIQUE NOT NULL, | ||
"media_type" text, | ||
"schema_version" int | ||
); | ||
|
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 |
---|---|---|
@@ -1,9 +1,7 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
/Applications/Postgres.app/Contents/Versions/14/bin/psql -v ON_ERROR_STOP=1 --username "$PGUSER" --dbname "$PGDATABASE" <<-EOSQL | ||
CREATE USER jane_doe; | ||
GRANT ALL PRIVILEGES ON DATABASE open_registry TO jane_doe; | ||
psql -v ON_ERROR_STOP=1 --host="0.0.0.0" --port="5432" --username "$PGUSER" --dbname "$PGDATABASE" <<-EOSQL | ||
\c open_registry; | ||
\i scripts/postgres/OpenRegistry.sql | ||
EOSQL |