-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinit.sql
More file actions
22 lines (16 loc) · 810 Bytes
/
init.sql
File metadata and controls
22 lines (16 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CREATE TABLE IF NOT EXISTS SageStorage.Buckets (
id BINARY(16) NOT NULL PRIMARY KEY,
name VARCHAR(64),
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
);
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