-
Notifications
You must be signed in to change notification settings - Fork 431
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: drop old vcs tables (#6804)
* refactor: drop old vcs table Signed-off-by: Yvonnick Esnault <[email protected]>
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
-- +migrate Up | ||
DROP TABLE project_vcs_server_link_data; | ||
DROP TABLE project_vcs_server_link; | ||
|
||
|
||
-- +migrate Down | ||
|
||
CREATE TABLE IF NOT EXISTS "project_vcs_server_link" ( | ||
"id" BIGSERIAL PRIMARY KEY, | ||
"project_id" BIGINT NOT NULL, | ||
"name" TEXT NOT NULL, | ||
"username" TEXT, | ||
"vcs_project" TEXT, | ||
"sig" BYTEA, | ||
"signer" TEXT | ||
); | ||
|
||
SELECT create_unique_index('project_vcs_server_link','IDX_PROJECT_VCS_SERVER_LINK_NAME','project_id,name'); | ||
SELECT create_foreign_key_idx_cascade('FK_DX_PROJECT_VCS_SERVER_LINK_PROJECT', 'project_vcs_server_link', 'project', 'project_id', 'id'); | ||
|
||
CREATE TABLE IF NOT EXISTS "project_vcs_server_link_data" ( | ||
"id" BIGSERIAL PRIMARY KEY, | ||
"project_vcs_server_link_id" BIGINT NOT NULL, | ||
"key" TEXT NOT NULL, | ||
"cipher_value" BYTEA, | ||
"sig" BYTEA, | ||
"signer" TEXT | ||
); | ||
|
||
SELECT create_unique_index('project_vcs_server_link_data','IDX_PROJECT_VCS_SERVER_LINK_DATA_KEY','project_vcs_server_link_id,key'); | ||
SELECT create_foreign_key_idx_cascade('FK_DX_PROJECT_VCS_SERVER_LINK_DATA_PROJECT', 'project_vcs_server_link_data', 'project_vcs_server_link', 'project_vcs_server_link_id', 'id'); |