Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vospacebackend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sara Bertocco
vospacebackend
Commits
356f3db3
Commit
356f3db3
authored
8 years ago
by
Sara Bertocco
Browse files
Options
Downloads
Patches
Plain Diff
Complete database description
parent
3d9d90b0
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/sql/create_vospace_backend.sql
+136
-6
136 additions, 6 deletions
src/main/java/sql/create_vospace_backend.sql
with
136 additions
and
6 deletions
src/main/java/sql/create_vospace_backend.sql
+
136
−
6
View file @
356f3db3
/**_____________________________________________________________________________
/**_____________________________________________________________________________
*
*
* OATS - INAF
* OATS - INAF
...
@@ -23,12 +22,27 @@
...
@@ -23,12 +22,27 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* _____________________________________________________________________________
* _____________________________________________________________________________
**/
**/
CREATE
DATABASE
vosbackend
;
use
vosbackend
;
/*
This file contains the complete database needed to run a VOSpace:
the VOSpace front-end tables to manage stored files metadata
the VOSpace back-end tables to manage stored files
the UWS tables to manage Job metadata
*/
/*
DataBase creation and grant assignment
*/
CREATE
DATABASE
cadctest
;
grant
all
on
vosbackend
.
*
to
'vosbackadmin'
identified
by
'Peper0ne'
;
use
cadctest
;
grant
all
on
cadctest
.
*
to
'oatsops'
identified
by
'Peper0ne'
;
/*
VOSpace back-end
*/
CREATE
TABLE
StoredFiles
CREATE
TABLE
StoredFiles
(
(
fileID
int
NOT
NULL
AUTO_INCREMENT
,
fileID
int
NOT
NULL
AUTO_INCREMENT
,
...
@@ -38,10 +52,126 @@ CREATE TABLE StoredFiles
...
@@ -38,10 +52,126 @@ CREATE TABLE StoredFiles
PRIMARY
KEY
(
fileID
)
PRIMARY
KEY
(
fileID
)
)
ENGINE
=
InnoDB
;
)
ENGINE
=
InnoDB
;
CREATE
TABLE
NodeStoredFileAndNode
CREATE
TABLE
StoredFileAndNode
(
(
storedFileID
varchar
(
255
)
NOT
NULL
,
storedFileID
varchar
(
255
)
NOT
NULL
,
nodeID
BIGINT
(
20
)
NOT
NULL
,
nodeID
BIGINT
(
20
)
NOT
NULL
,
PRIMARY
KEY
(
storedFileID
)
PRIMARY
KEY
(
storedFileID
)
)
ENGINE
=
InnoDB
;
)
ENGINE
=
InnoDB
;
/*
VOSpace front-end
*/
CREATE
TABLE
Node
(
nodeID
BIGINT
(
20
)
NOT
NULL
AUTO_INCREMENT
,
parentID
BIGINT
(
20
)
default
NULL
,
name
VARCHAR
(
256
)
NOT
NULL
,
type
CHAR
(
1
)
NOT
NULL
,
busyState
CHAR
(
1
)
NOT
NULL
,
ownerID
INT
(
40
)
NOT
NULL
,
creatorID
INT
(
40
)
NOT
NULL
,
groupRead
VARCHAR
(
256
)
default
NULL
,
groupWrite
VARCHAR
(
256
)
default
NULL
,
isPublic
BIT
(
1
)
NOT
NULL
,
isLocked
BIT
(
1
)
NOT
NULL
,
delta
BIGINT
(
20
)
default
NULL
,
contentType
VARCHAR
(
100
)
default
NULL
,
contentEncoding
VARCHAR
(
50
)
default
NULL
,
contentLength
BIGINT
(
20
)
default
NULL
,
contentMD5
BINARY
(
16
)
default
NULL
,
createdOn
DATETIME
default
CURRENT_TIMESTAMP
,
lastModified
DATETIME
NOT
NULL
,
link
TEXT
default
NULL
,
PRIMARY
KEY
(
nodeID
)
)
ENGINE
=
InnoDB
;
CREATE
TABLE
NodeProperty
(
nodeID
BIGINT
(
20
)
NOT
NULL
,
propertyURI
VARCHAR
(
256
)
NOT
NULL
,
propertyValue
VARCHAR
(
512
)
default
NULL
,
lastModified
DATETIME
default
CURRENT_TIMESTAMP
,
-- support replication with a fake primary key
_rep_support
bigint
(
20
)
NOT
NULL
PRIMARY
KEY
,
foreign
key
(
nodeID
)
references
Node
(
nodeID
)
)
ENGINE
=
InnoDB
;
CREATE
TABLE
DeletedNode
(
nodeID
bigint
(
20
)
NOT
NULL
name
varchar
(
276
)
NOT
NULL
,
ownerID
varchar
(
256
)
NOT
NULL
,
lastModified
DATETIME
NOT
NULL
,
PRIMARY
KEY
(
nodeID
)
)
ENGINE
=
InnoDB
;
/*
UWS
*/
create
table
Job
(
jobID
varchar
(
16
)
NOT
NULL
,
runID
varchar
(
128
),
-- suitable column when using the X500IdentityManager
ownerID
varchar
(
128
),
executionPhase
varchar
(
16
)
not
null
,
executionDuration
bigint
(
20
)
not
null
,
destructionTime
DATETIME
,
quote
DATETIME
,
startTime
DATETIME
,
endTime
DATETIME
,
error_summaryMessage
varchar
(
1024
),
error_type
varchar
(
16
),
error_documentURL
varchar
(
128
),
requestPath
varchar
(
128
),
remoteIP
varchar
(
20
),
jobInfo_content
varchar
(
1000
)
jobInfo_contentType
varchar
(
128
),
jobInfo_valid
smallint
(
6
),
deletedByUser
smallint
(
6
)
default
0
,
lastModified
DATETIME
not
null
,
primary
key
(
jobID
)
)
ENGINE
=
InnoDB
;
create
table
JobDetail
(
jobID
varchar
(
16
)
not
null
,
type
char
(
1
)
not
null
,
name
varchar
(
128
)
not
null
,
value
varchar
(
128
),
foreign
key
(
jobID
)
references
Job
(
jobID
)
)
ENGINE
=
InnoDB
;
create
index
uws_param_i1
on
JobDetail
(
jobID
);
/*
Initialize root node for vospace
*/
insert
into
Node
(
name
,
parentID
,
type
,
busyState
,
ownerID
,
creatorID
,
groupRead
,
groupWrite
,
isPublic
,
isLocked
,
lastModified
)
values
(
'vospaceRootNode'
,
NULL
,
'C'
,
'N'
,
'123456789'
,
'123456789'
,
'inaf-ops'
,
'inaf-ops'
,
1
,
0
,
'2016-04-15 11:51:09'
);
/* Should be:
select * from Node where name='MyVoNode';
+--------+----------+----------+------+-----------+-----------+-----------+-----------+------------+----------+----------+-------+-------------+-----------------+---------------+------------+---------------------+---------------------+------+
| nodeID | parentID | name | type | busyState | ownerID | creatorID | groupRead | groupWrite | isPublic | isLocked | delta | contentType | contentEncoding | contentLength | contentMD5 | createdOn | lastModified | link |
+--------+----------+----------+------+-----------+-----------+-----------+-----------+------------+----------+----------+-------+-------------+-----------------+---------------+------------+---------------------+---------------------+------+
| 1 | NULL | myVONode | C | N | 123456789 | 123456789 | inaf-ops | inaf-ops | | | NULL | NULL | NULL | NULL | NULL | 2016-07-01 13:19:07 | 2016-06-30 11:51:09 | NULL |
+--------+----------+----------+------+-----------+-----------+-----------+-----------+------------+----------+---------
where 123456789 is the numeric ID of the owner (admin) in the ldap server and inaf-ops is a group in ldap belongind to ldap admin groups. 123456789 must belong to the group inaf-ops
*/
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment