Skip to content

Commit

Permalink
Update schemaspy and schema
Browse files Browse the repository at this point in the history
  • Loading branch information
kifj committed Mar 23, 2024
1 parent ce1c707 commit 67c85b9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions etc/create-postgresql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ CREATE TABLE stocks.share (
key character varying(25) NOT NULL,
name character varying(80) NOT NULL,
version bigint,
CONSTRAINT share_pkey PRIMARY KEY (id)
CONSTRAINT share_pkey PRIMARY KEY (id),
CONSTRAINT idx_key UNIQUE (key);
);

CREATE SEQUENCE stocks.share_seq INCREMENT BY 50;

CREATE UNIQUE INDEX idx_key ON stocks.share (key);
CREATE INDEX idx_name ON stocks.share (name);
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -581,14 +581,14 @@
<plugin>
<groupId>x1.maven</groupId>
<artifactId>schemaspy-maven-plugin</artifactId>
<version>1.10</version>
<version>2.0</version>
<configuration>
<host>db.x1</host>
<dbname>stocks</dbname>
<schema>stocks</schema>
<username>stocks</username>
<password>stocks</password>
<type>pgsql</type>
<type>pgsql11</type>
</configuration>
</plugin>
<plugin>
Expand Down
4 changes: 2 additions & 2 deletions src/main/docker/x1-postgres-stomp-test/sql/ddl.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ CREATE TABLE stocks.share (
key character varying(25) NOT NULL,
name character varying(80) NOT NULL,
version bigint,
CONSTRAINT share_pkey PRIMARY KEY (id)
CONSTRAINT share_pkey PRIMARY KEY (id),
CONSTRAINT idx_key UNIQUE (key);
);

CREATE SEQUENCE stocks.share_seq INCREMENT BY 50;

CREATE UNIQUE INDEX idx_key ON stocks.share (key);
CREATE INDEX idx_name ON stocks.share (name);
6 changes: 3 additions & 3 deletions src/main/java/x1/stomp/model/Share.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
@Cacheable
@XmlRootElement(name = "share")
@XmlAccessorType(XmlAccessType.FIELD)
@Table(name = "share", uniqueConstraints = @UniqueConstraint(columnNames = "key"), indexes = {
@Index(columnList = "key", name = "idx_key", unique = false),
@Index(columnList = "name", name = "idx_name", unique = false) })
@Table(name = "share",
uniqueConstraints = @UniqueConstraint(columnNames = "key", name = "idx_key"),
indexes = { @Index(columnList = "name", name = "idx_name", unique = false) })
@NamedQuery(name = Share.FIND_BY_KEY, query = "select s from Share s where s.key = :key")
@NamedQuery(name = Share.LIST_ALL, query = "select s from Share s order by s.name")
@NamedQuery(name = Share.COUNT_ALL, query = "select count(s.id) from Share s")
Expand Down

0 comments on commit 67c85b9

Please sign in to comment.