-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NAS-2468: Database upgrade sql added for postgres and mysql.
- Loading branch information
Showing
13 changed files
with
275 additions
and
16 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
deploy/deploy-core/scripts/derby/migration/eav_attribute.1.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,13 @@ | ||
CREATE TABLE eav_attribute ( | ||
tree_id INTEGER NOT NULL, | ||
id INTEGER NOT NULL generated always as identity, | ||
entity_id INTEGER NOT NULL, | ||
type_id INTEGER NOT NULL, | ||
val_int INTEGER, | ||
val_datetime TIMESTAMP, | ||
val_varchar VARCHAR(8000), | ||
val_text CLOB, | ||
PRIMARY KEY (tree_id, id) | ||
); | ||
|
||
CREATE UNIQUE INDEX eav_attribute_idx on eav_attribute(tree_id, entity_id); |
16 changes: 16 additions & 0 deletions
16
deploy/deploy-core/scripts/derby/migration/eav_type_attribute.1.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,16 @@ | ||
CREATE TABLE eav_type_attribute ( | ||
tree_id INTEGER NOT NULL, | ||
id INTEGER NOT NULL, | ||
name VARCHAR(96) NOT NULL, | ||
class_namespace VARCHAR(96) NOT NULL, | ||
class_name VARCHAR(96) NOT NULL, | ||
datatype INTEGER NOT NULL, | ||
viewtype INTEGER NOT NULL, | ||
def_int INTEGER, | ||
def_datetime TIMESTAMP, | ||
def_varchar VARCHAR(8000), | ||
def_text CLOB, | ||
PRIMARY KEY (tree_id, id) | ||
); | ||
|
||
CREATE UNIQUE INDEX eav_type_attribute_idx on eav_type_attribute(tree_id, id); |
16 changes: 16 additions & 0 deletions
16
deploy/deploy-core/scripts/postgresql/migration/eav_attribute.1.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,16 @@ | ||
CREATE SEQUENCE eav_attribute_seq; | ||
|
||
CREATE TABLE eav_attribute ( | ||
tree_id INTEGER NOT NULL, | ||
id INTEGER NOT NULL DEFAULT NEXTVAL('eav_attribute_seq'), | ||
entity_id INTEGER NOT NULL, | ||
type_id INTEGER NOT NULL, | ||
val_int INTEGER NULL, | ||
val_datetime TIMESTAMP NULL, | ||
val_varchar VARCHAR(8000) NULL, | ||
val_text TEXT NULL | ||
); | ||
|
||
ALTER TABLE eav_attribute ADD CONSTRAINT eav_attribute_pkey PRIMARY KEY (tree_id, id); | ||
|
||
CREATE UNIQUE INDEX eav_attribute_idx on eav_attribute(tree_id, entity_id) TABLESPACE tsindex; |
17 changes: 17 additions & 0 deletions
17
deploy/deploy-core/scripts/postgresql/migration/eav_type_attribute.1.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,17 @@ | ||
CREATE TABLE eav_type_attribute ( | ||
tree_id INTEGER NOT NULL, | ||
id INTEGER NOT NULL, | ||
name VARCHAR(96) NOT NULL, | ||
class_namespace VARCHAR(96) NOT NULL, | ||
class_name VARCHAR(96) NOT NULL, | ||
datatype INTEGER NOT NULL, | ||
viewtype INTEGER NOT NULL, | ||
def_int INTEGER NULL, | ||
def_datetime TIMESTAMP NULL, | ||
def_varchar VARCHAR(8000) NULL, | ||
def_text TEXT NULL | ||
); | ||
|
||
ALTER TABLE eav_type_attribute ADD CONSTRAINT eav_type_attribute_pkey PRIMARY KEY (tree_id, id); | ||
|
||
CREATE UNIQUE INDEX eav_type_attribute_idx on eav_type_attribute(tree_id, id) TABLESPACE tsindex; |
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
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
Oops, something went wrong.