-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add RegistryLock schema to Flyway deployment folder (#270)
* Add RegistryLock schema to Flyway deployment folder Added creation script of RegistryLock to Flyway deployment folder. Fixed previous scripts (PremiumList- and ClaimsList-related) for FK name change (cause by table name changes: names are quoted now). We should consider generating foreign key names by ourselves. Since the alpha database is empty, we dropped and recreated the schema. Added instructions on how to submit new database incremental changes in the README file. Updated RegistryLock.java, removing unnecessary annotations: - For most fields, the 'name=' property is no longer necessary not that the naming strategy is in place. The exceptions are the two used in the unique index. - The @column annotation is implicit.
- Loading branch information
Showing
6 changed files
with
147 additions
and
27 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
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
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
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
30 changes: 30 additions & 0 deletions
30
db/src/main/resources/sql/flyway/V3__create_registry_lock.sql
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,30 @@ | ||
-- Copyright 2019 The Nomulus Authors. All Rights Reserved. | ||
-- | ||
-- Licensed under the Apache License, Version 2.0 (the "License"); | ||
-- you may not use this file except in compliance with the License. | ||
-- You may obtain a copy of the License at | ||
-- | ||
-- http://www.apache.org/licenses/LICENSE-2.0 | ||
-- | ||
-- Unless required by applicable law or agreed to in writing, software | ||
-- distributed under the License is distributed on an "AS IS" BASIS, | ||
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
-- See the License for the specific language governing permissions and | ||
-- limitations under the License. | ||
|
||
create table "RegistryLock" ( | ||
revision_id bigserial not null, | ||
action text not null, | ||
completion_timestamp timestamptz, | ||
creation_timestamp timestamptz not null, | ||
domain_name text not null, | ||
is_superuser boolean not null, | ||
registrar_id text not null, | ||
registrar_poc_id text, | ||
repo_id text not null, | ||
verification_code text not null, | ||
primary key (revision_id) | ||
); | ||
|
||
alter table if exists "RegistryLock" | ||
add constraint idx_registry_lock_repo_id_revision_id unique (repo_id, revision_id); |
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