b7a7d09f7b0e9600cbd0e39bef4854c0cdeaa5d8
1 -- File backend operation journal
2 CREATE TABLE /*_*/filejournal (
3 -- Unique ID for each file operation
4 fj_id
bigint unsigned
NOT NULL PRIMARY KEY auto_increment
,
5 -- UUID of the batch this operation belongs to
6 fj_batch_uuid
varbinary(32) NOT NULL,
7 -- The registered file backend name
8 fj_backend
varchar(255) NOT NULL,
9 -- The storage path that was affected (may be internal paths)
10 fj_path
blob NOT NULL,
11 -- SHA-1 file path hash in base-36
12 fj_path_sha1
varbinary(32) NOT NULL default '',
13 -- Primitive operation description (create/update/delete)
14 fj_op
varchar(16) NOT NULL default '',
15 -- SHA-1 file content hash in base-36
16 fj_new_sha1
varbinary(32) NOT NULL default '',
17 -- Timestamp of the batch operation
18 fj_timestamp
varbinary(14) NOT NULL default ''
21 CREATE INDEX /*i*/fj_batch_id
ON /*_*/filejournal (fj_batch_uuid
,fj_id
);
22 CREATE INDEX /*i*/fj_path_id
ON /*_*/filejournal (fj_path_sha1
,fj_id
);
23 CREATE INDEX /*i*/fj_new_sha1
ON /*_*/filejournal (fj_new_sha1
,fj_id
);
24 CREATE INDEX /*i*/fj_timestamp
ON /*_*/filejournal (fj_timestamp
);