forked from sagecontinuum/sage-storage-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sql
More file actions
23 lines (18 loc) · 892 Bytes
/
init.sql
File metadata and controls
23 lines (18 loc) · 892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CREATE TABLE IF NOT EXISTS SageStorage.Buckets (
id BINARY(16) NOT NULL PRIMARY KEY,
name VARCHAR(512),
type VARCHAR(64),
time_created TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
time_last_updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
owner VARCHAR(64) NOT NULL,
INDEX (name,type, owner)
);
# CREATE INDEX on_name ON SageStorage.Buckets(name);
CREATE TABLE IF NOT EXISTS SageStorage.BucketPermissions (
id BINARY(16) NOT NULL,
granteeType ENUM('USER', 'GROUP'),
grantee VARCHAR(64),
permission ENUM('READ', 'WRITE', 'READ_ACP', 'WRITE_ACP', 'FULL_CONTROL'),
PRIMARY KEY (id, granteeType, grantee, permission)
);
# permissions similar to https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview.html