Skip to content

Commit

Permalink
Fix #672: Liquibase updates
Browse files Browse the repository at this point in the history
  • Loading branch information
banterCZ committed Sep 14, 2023
1 parent 7aac45e commit 84d0173
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/PowerAuth-Push-Server-1.4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Message inbox requires a simple database structure below:
-- Create table for message inbox
CREATE TABLE push_inbox (
id INTEGER NOT NULL CONSTRAINT push_inbox_pk PRIMARY KEY,
inbox_id VARCHAR(37),
inbox_id VARCHAR(37) NOT NULL,
user_id VARCHAR(255) NOT NULL,
type VARCHAR(32) NOT NULL,
subject TEXT NOT NULL,
Expand Down
17 changes: 17 additions & 0 deletions docs/PowerAuth-Push-Server-1.5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,23 @@ CREATE UNIQUE INDEX push_app_cred_app ON push_app_credentials(app_id);
```


### Missing Inbox Constraint

Inbox table is missing _not null_ constraint for `inbox_id`.

### PostgreSQL

```sql
alter table push_inbox alter column inbox_id set not null;
```

### Oracle

```sql
alter table push_inbox modify inbox_id not null;
```


### Drop MySQL Support

Since version `1.5.0`, MySQL database is not supported anymore.
Expand Down
2 changes: 1 addition & 1 deletion docs/Push-Server-Database.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ Stores the messages to be delivered to particular users.
```sql
CREATE TABLE push_inbox (
id INTEGER NOT NULL CONSTRAINT push_inbox_pk PRIMARY KEY,
inbox_id VARCHAR(37),
inbox_id VARCHAR(37) NOT NULL,
user_id VARCHAR(255) NOT NULL,
type VARCHAR(32) NOT NULL;
subject TEXT NOT NULL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
<tableExists tableName="push_inbox"/>
</not>
</preConditions>
<comment>Create a new sequence push_inbox</comment>
<comment>Create a new table push_inbox</comment>
<createTable tableName="push_inbox">
<column name="id" type="integer">
<constraints primaryKey="true" />
Expand Down
2 changes: 1 addition & 1 deletion docs/sql/oracle/create_push_server_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ CREATE TABLE PUSH_CAMPAIGN_USER (

CREATE TABLE PUSH_INBOX (
ID NUMBER(19) PRIMARY KEY NOT NULL,
INBOX_ID VARCHAR2(37 CHAR),
INBOX_ID VARCHAR2(37 CHAR) NOT NULL,
USER_ID VARCHAR2(255 CHAR) NOT NULL,
TYPE VARCHAR2(32 CHAR) NOT NULL,
SUBJECT VARCHAR2(4000 CHAR) NOT NULL,
Expand Down
2 changes: 1 addition & 1 deletion docs/sql/postgresql/create_push_server_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ CREATE TABLE push_campaign_user (
-- Create table for message inbox
CREATE TABLE push_inbox (
id INTEGER NOT NULL CONSTRAINT push_inbox_pk PRIMARY KEY,
inbox_id VARCHAR(37),
inbox_id VARCHAR(37) NOT NULL,
user_id VARCHAR(255) NOT NULL,
type VARCHAR(32) NOT NULL,
subject TEXT NOT NULL,
Expand Down

0 comments on commit 84d0173

Please sign in to comment.