mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-02 15:14:09 +01:00
6d800cabbd
This commit is to enable data migrator to support migrates data from mysql to pgsql, this is a specific step for user to upgrade harbor across v1.5.0, as we have move harbor DB to pgsql from 1.5.0. It supports both harbor and notary db data migration, and be split into two steps with dependency. It also fix issue #4847, add build DB migrator in make process.
27 lines
788 B
PL/PgSQL
27 lines
788 B
PL/PgSQL
\c notarysigner;
|
|
|
|
CREATE TABLE "private_keys" (
|
|
"id" int PRIMARY KEY,
|
|
"created_at" timestamp NULL DEFAULT NULL,
|
|
"updated_at" timestamp NULL DEFAULT NULL,
|
|
"deleted_at" timestamp NULL DEFAULT NULL,
|
|
"key_id" varchar(255) NOT NULL,
|
|
"encryption_alg" varchar(255) NOT NULL,
|
|
"keywrap_alg" varchar(255) NOT NULL,
|
|
"algorithm" varchar(50) NOT NULL,
|
|
"passphrase_alias" varchar(50) NOT NULL,
|
|
"public" bytea NOT NULL,
|
|
"private" bytea NOT NULL,
|
|
"gun" varchar(255) NOT NULL,
|
|
"role" varchar(255) NOT NULL,
|
|
"last_used" timestamp NULL DEFAULT NULL,
|
|
CONSTRAINT "key_id" UNIQUE ("key_id"),
|
|
CONSTRAINT "key_id_2" UNIQUE ("key_id","algorithm")
|
|
);
|
|
|
|
|
|
CREATE TABLE "schema_migrations" (
|
|
"version" int PRIMARY KEY
|
|
);
|
|
|
|
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO signer; |