Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f7da4a1
commit 1a51817
Showing
8 changed files
with
42 additions
and
42 deletions.
There are no files selected for viewing
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
2 changes: 1 addition & 1 deletion
2
src/community/jdbcstore/src/main/resources/org/geoserver/jdbcstore/internal/drop.h2.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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1 +1 @@ | |||
DROP TABLE resource CASCADE; | DROP TABLE resources CASCADE; |
2 changes: 1 addition & 1 deletion
2
...community/jdbcstore/src/main/resources/org/geoserver/jdbcstore/internal/drop.postgres.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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1 +1 @@ | |||
DROP TABLE resource CASCADE; | DROP TABLE resources CASCADE; |
20 changes: 10 additions & 10 deletions
20
src/community/jdbcstore/src/main/resources/org/geoserver/jdbcstore/internal/init.h2.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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,22 +1,22 @@ | |||
CREATE TABLE resource | CREATE TABLE resources | ||
( | ( | ||
oid integer AUTO_INCREMENT NOT NULL, | oid integer AUTO_INCREMENT NOT NULL, | ||
name character varying NOT NULL, | name character varying NOT NULL, | ||
parent integer, | parent integer, | ||
last_modified timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | last_modified timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
content binary, | content binary, | ||
CONSTRAINT resource_pkey PRIMARY KEY (oid), | CONSTRAINT resources_pkey PRIMARY KEY (oid), | ||
CONSTRAINT resource_parent_fkey FOREIGN KEY (parent) | CONSTRAINT resources_parent_fkey FOREIGN KEY (parent) | ||
REFERENCES resource (oid) | REFERENCES resources (oid) | ||
ON UPDATE RESTRICT ON DELETE CASCADE, | ON UPDATE RESTRICT ON DELETE CASCADE, | ||
CONSTRAINT resource_parent_name_key UNIQUE (parent, name), | CONSTRAINT resources_parent_name_key UNIQUE (parent, name), | ||
CONSTRAINT resource_only_one_root_check CHECK (parent IS NOT NULL OR oid = 0) | CONSTRAINT resources_only_one_root_check CHECK (parent IS NOT NULL OR oid = 0) | ||
); | ); | ||
|
|
||
CREATE INDEX resource_parent_name_idx | CREATE INDEX resources_parent_name_idx | ||
ON resource (parent NULLS FIRST, name NULLS FIRST); | ON resources (parent NULLS FIRST, name NULLS FIRST); | ||
|
|
||
INSERT INTO resource (oid, name, parent, content) VALUES (0, '', NULL, NULL); | INSERT INTO resources (oid, name, parent, content) VALUES (0, '', NULL, NULL); | ||
|
|
||
ALTER TABLE resource ALTER COLUMN oid RESTART WITH 1; | ALTER TABLE resources ALTER COLUMN oid RESTART WITH 1; | ||
|
|
18 changes: 9 additions & 9 deletions
18
...community/jdbcstore/src/main/resources/org/geoserver/jdbcstore/internal/init.postgres.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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,20 +1,20 @@ | |||
CREATE TABLE resource | CREATE TABLE resources | ||
( | ( | ||
oid serial NOT NULL, | oid serial NOT NULL, | ||
name character varying NOT NULL, | name character varying NOT NULL, | ||
parent integer, | parent integer, | ||
last_modified timestamp without time zone NOT NULL DEFAULT timezone('UTC'::text, now()), | last_modified timestamp without time zone NOT NULL DEFAULT timezone('UTC'::text, now()), | ||
content bytea, | content bytea, | ||
CONSTRAINT resource_pkey PRIMARY KEY (oid), | CONSTRAINT resources_pkey PRIMARY KEY (oid), | ||
CONSTRAINT resource_parent_fkey FOREIGN KEY (parent) | CONSTRAINT resources_parent_fkey FOREIGN KEY (parent) | ||
REFERENCES resource (oid) | REFERENCES resources (oid) | ||
ON UPDATE RESTRICT ON DELETE CASCADE, | ON UPDATE RESTRICT ON DELETE CASCADE, | ||
CONSTRAINT resource_parent_name_key UNIQUE (parent, name), | CONSTRAINT resources_parent_name_key UNIQUE (parent, name), | ||
CONSTRAINT resource_only_one_root_check CHECK (parent IS NOT NULL OR oid = 0) | CONSTRAINT resources_only_one_root_check CHECK (parent IS NOT NULL OR oid = 0) | ||
); | ); | ||
|
|
||
CREATE INDEX resource_parent_name_idx | CREATE INDEX resources_parent_name_idx | ||
ON resource (parent NULLS FIRST, name NULLS FIRST); | ON resources (parent NULLS FIRST, name NULLS FIRST); | ||
|
|
||
INSERT INTO resource (oid, name, parent, content) VALUES (0, '', NULL, NULL); | INSERT INTO resources (oid, name, parent, content) VALUES (0, '', NULL, NULL); | ||
|
|
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