Fix Sql Scripts.

Original pull request #1893
This commit is contained in:
Jens Schauder
2025-05-15 14:22:06 +02:00
committed by Mark Paluch
parent 563f8bb0a8
commit 19ff9fafa6
3 changed files with 49 additions and 8 deletions

View File

@@ -3,13 +3,43 @@ DROP TABLE PrimitiveIdEntity;
DROP TABLE ImmutableWithManualIdentity;
DROP TABLE EntityWithSeq;
DROP TABLE PrimitiveIdEntityWithSeq;
DROP TABLE SimpleSeq;
DROP SEQUENCE simple_seq_seq;
DROP TABLE PersistableSeq;
DROP SEQUENCE persistable_seq_seq;
DROP TABLE PrimitiveIdSeq;
DROP SEQUENCE "primitive_seq_seq";
CREATE TABLE ReadOnlyIdEntity (ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) PRIMARY KEY, NAME VARCHAR(100));
CREATE TABLE PrimitiveIdEntity (ID BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) PRIMARY KEY, NAME VARCHAR(100));
CREATE TABLE ImmutableWithManualIdentity (ID BIGINT NOT NULL PRIMARY KEY, NAME VARCHAR(100));
CREATE TABLE SimpleSeq (ID BIGINT NOT NULL PRIMARY KEY, NAME VARCHAR(100));
CREATE TABLE ReadOnlyIdEntity
(
ID BIGINT GENERATED BY DEFAULT AS IDENTITY (START WITH 1) PRIMARY KEY,
NAME VARCHAR(100)
);
CREATE TABLE PrimitiveIdEntity
(
ID BIGINT GENERATED BY DEFAULT AS IDENTITY (START WITH 1) PRIMARY KEY,
NAME VARCHAR(100)
);
CREATE TABLE ImmutableWithManualIdentity
(
ID BIGINT NOT NULL PRIMARY KEY,
NAME VARCHAR(100)
);
CREATE TABLE SimpleSeq
(
ID BIGINT NOT NULL PRIMARY KEY,
NAME VARCHAR(100)
);
CREATE SEQUENCE simple_seq_seq START WITH 1;
CREATE TABLE PersistableSeq (ID BIGINT NOT NULL PRIMARY KEY, NAME VARCHAR(100));
CREATE TABLE PersistableSeq
(
ID BIGINT NOT NULL PRIMARY KEY,
NAME VARCHAR(100)
);
CREATE SEQUENCE persistable_seq_seq START WITH 1;
CREATE TABLE PrimitiveIdSeq (ID BIGINT NOT NULL PRIMARY KEY, NAME VARCHAR(100));
CREATE TABLE PrimitiveIdSeq
(
ID BIGINT NOT NULL PRIMARY KEY,
NAME VARCHAR(100)
);
CREATE SEQUENCE "primitive_seq_seq" START WITH 1;

View File

@@ -2,8 +2,12 @@ DROP TABLE IF EXISTS ReadOnlyIdEntity;
DROP TABLE IF EXISTS PrimitiveIdEntity;
DROP TABLE IF EXISTS ImmutableWithManualIdentity;
DROP TABLE IF EXISTS EntityWithSeq;
DROP TABLE IF EXISTS PersistableEntityWithSeq;
DROP TABLE IF EXISTS PrimitiveIdEntityWithSeq;
DROP TABLE IF EXISTS SimpleSeq;
DROP SEQUENCE IF EXISTS simple_seq_seq;
DROP TABLE IF EXISTS PersistableSeq;
DROP SEQUENCE IF EXISTS persistable_seq_seq;
DROP TABLE IF EXISTS PrimitiveIdSeq;
DROP SEQUENCE IF EXISTS primitive_seq_seq;
CREATE TABLE ReadOnlyIdEntity (ID BIGINT IDENTITY PRIMARY KEY, NAME VARCHAR(100));
CREATE TABLE PrimitiveIdEntity (ID BIGINT IDENTITY PRIMARY KEY, NAME VARCHAR(100));

View File

@@ -1,6 +1,13 @@
DROP TABLE ReadOnlyIdEntity;
DROP TABLE PrimitiveIdEntity;
DROP TABLE ImmutableWithManualIdentity;
DROP TABLE ImmutableWithManualIdentity;
DROP TABLE SimpleSeq;
DROP SEQUENCE simple_seq_seq;
DROP TABLE PersistableSeq;
DROP SEQUENCE persistable_seq_seq;
DROP TABLE PrimitiveIdSeq;
DROP SEQUENCE "primitive_seq_seq";
CREATE TABLE ReadOnlyIdEntity (
ID NUMBER GENERATED by default on null as IDENTITY PRIMARY KEY,