Skip to content

Commit 098fb77

Browse files
committed
added sql script for daogen db jvfs
1 parent 4e08a8e commit 098fb77

File tree

8 files changed

+77
-20
lines changed

8 files changed

+77
-20
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# JMountDaogenDB setup
2+
3+
Here you can find the database setup script.
4+
5+
Basically it is the db_jvfs_file table creation and setup.
6+
7+
8+
## Default database scripts
9+
10+
### DDL Scripts
11+
* [core/jvfs/daogen/sql/default/01_db_jvfs_file_ddl.sql](default/01_db_jvfs_file_ddl.sql)
12+
* [core/jvfs/daogen/sql/default/02_db_jvfs_file_comments.sql](default/02_db_jvfs_file_comments.sql)
13+
14+
### Creates the root file
15+
* [core/jvfs/daogen/sql/default/03_insert_sample.sql](default/03_insert_sample.sql)
16+
17+
### Drop DDL
18+
* [core/jvfs/daogen/sql/default/drop_db_jvfs_file.sql](default/drop_db_jvfs_file.sql)
19+
20+
21+
# Oracle database scripts
22+
23+
## DDL Scripts
24+
* [core/jvfs/daogen/sql/oracle/01_db_jvfs_file_ddl.sql](oracle/01_db_jvfs_file_ddl.sql)
25+
* [core/jvfs/daogen/sql/default/02_db_jvfs_file_comments.sql](default/02_db_jvfs_file_comments.sql)
26+
27+
## Creates the root file
28+
* [core/jvfs/daogen/sql/oracle/03_insert_sample.sql](oracle/03_insert_sample.sql)
29+
30+
### Drop DDL
31+
* [core/jvfs/daogen/sql/default/drop_db_jvfs_file.sql](default/drop_db_jvfs_file.sql)
32+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
3+
CREATE TABLE db_jvfs_file (
4+
file_name VARCHAR(1024) NOT NULL,
5+
parent_path VARCHAR(2048) NOT NULL,
6+
file_props VARCHAR(1024),
7+
creation_time TIMESTAMP NOT NULL,
8+
update_time TIMESTAMP NOT NULL,
9+
file_size BIGINT,
10+
file_content BLOB
11+
);
12+
ALTER TABLE db_jvfs_file ADD CONSTRAINT db_jvfs_file_ok PRIMARY KEY ( file_name, parent_path );
13+
COMMENT ON TABLE db_jvfs_file IS 'The files in the file system';
14+
COMMENT ON COLUMN db_jvfs_file.file_name IS 'The file name';
15+
COMMENT ON COLUMN db_jvfs_file.parent_path IS 'The parent path, empty for root';
16+
COMMENT ON COLUMN db_jvfs_file.file_props IS 'File properties, for example RO; if the file is readonly';
17+
COMMENT ON COLUMN db_jvfs_file.creation_time IS 'File creation time';
18+
COMMENT ON COLUMN db_jvfs_file.update_time IS 'File update time';
19+
COMMENT ON COLUMN db_jvfs_file.file_size IS 'The size of the file (not set for directories)';
20+
COMMENT ON COLUMN db_jvfs_file.file_content IS 'The content of the file (not set for directories)';
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
COMMENT ON TABLE db_jvfs_file IS 'The files in the file system';
2+
COMMENT ON COLUMN db_jvfs_file.file_name IS 'The file name';
3+
COMMENT ON COLUMN db_jvfs_file.parent_path IS 'The parent path, empty for root';
4+
COMMENT ON COLUMN db_jvfs_file.file_props IS 'File properties, for example RO; if the file is readonly';
5+
COMMENT ON COLUMN db_jvfs_file.creation_time IS 'File creation time';
6+
COMMENT ON COLUMN db_jvfs_file.update_time IS 'File update time';
7+
COMMENT ON COLUMN db_jvfs_file.file_size IS 'The size of the file (not set for directories)';
8+
COMMENT ON COLUMN db_jvfs_file.file_content IS 'The content of the file (not set for directories)';
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
INSERT INTO ANSC_NG.DB_JVFS_FILE
2+
(FILE_NAME, PARENT_PATH, FILE_PROPS, CREATION_TIME, UPDATE_TIME, FILE_SIZE, FILE_CONTENT)
3+
VALUES('/', '//', NULL, current_timestamp, current_timestamp, NULL, NULL);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DROP TABLE db_jvfs_file;
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
CREATE TABLE db_jvfs_file (
3+
file_name VARCHAR(1024) NOT NULL,
4+
parent_path VARCHAR(2048) NOT NULL,
5+
file_props VARCHAR(1024),
6+
creation_time TIMESTAMP NOT NULL,
7+
update_time TIMESTAMP NOT NULL,
8+
file_size NUMBER(10),
9+
file_content BLOB
10+
);
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
INSERT INTO ANSC_NG.DB_JVFS_FILE
2+
(FILE_NAME, PARENT_PATH, FILE_PROPS, CREATION_TIME, UPDATE_TIME, FILE_SIZE, FILE_CONTENT)
3+
VALUES('/', '//', NULL, SYSDATE, SYSDATE, NULL, NULL);

fj-core/src/main/resources/core/jvfs/db/sample_init_script.sql

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)