Skip to content

Commit

Permalink
Re-generate schema
Browse files Browse the repository at this point in the history
  • Loading branch information
CydeWeys committed Oct 7, 2019
1 parent 7601056 commit d02effe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Expand Up @@ -17,10 +17,12 @@
import static com.google.common.base.Preconditions.checkState;

import google.registry.model.CreateAutoTimestamp;
import google.registry.persistence.CreateAutoTimestampConverter;
import java.math.BigDecimal;
import java.util.Map;
import javax.persistence.CollectionTable;
import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
Expand All @@ -42,20 +44,19 @@
* This is fine though, because we only use the list with the highest revisionId.
*/
@Entity
@Table(
name = "PremiumList",
indexes = {@Index(columnList = "name", name = "premiumlist_name_idx")})
@Table(indexes = {@Index(columnList = "name", name = "premiumlist_name_idx")})
public class PremiumList {

@Column(nullable = false)
private String name;

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(nullable = false)
@Column(name = "revision_id", nullable = false)
private Long revisionId;

@Column(nullable = false)
@Convert(converter = CreateAutoTimestampConverter.class)
private CreateAutoTimestamp creationTimestamp = CreateAutoTimestamp.create(null);

@Column(nullable = false)
Expand Down
2 changes: 2 additions & 0 deletions db/src/main/resources/sql/schema/db-schema.sql.generated
Expand Up @@ -132,6 +132,7 @@
revision_id bigserial not null,
creation_timestamp timestamptz not null,
currency bytea not null,
name text not null,
primary key (revision_id)
);

Expand All @@ -157,6 +158,7 @@

alter table if exists "Domain_GracePeriod"
add constraint UK_4ps2u4y8i5r91wu2n1x2xea28 unique (grace_periods_id);
create index premiumlist_name_idx on "PremiumList" (name);

alter table if exists "RegistryLock"
add constraint idx_registry_lock_repo_id_revision_id unique (repo_id, revision_id);
Expand Down

0 comments on commit d02effe

Please sign in to comment.