···208208 unique(did, email)209209 );210210211211+ create table if not exists artifacts (212212+ -- id213213+ id integer primary key autoincrement,214214+ did text not null,215215+ rkey text not null,216216+217217+ -- meta218218+ repo_at text not null,219219+ tag binary(20) not null,220220+ created text not null default (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')),221221+222222+ -- data223223+ blob_cid text not null,224224+ name text not null,225225+ size integer not null default 0,226226+ mimetype string not null default "*/*",227227+228228+ -- constraints229229+ unique(did, rkey), -- record must be unique230230+ unique(repo_at, tag, name), -- for a given tag object, each file must be unique231231+ foreign key (repo_at) references repos(at_uri) on delete cascade232232+ );233233+211234 create table if not exists migrations (212235 id integer primary key autoincrement,213236 name text unique