CREATE TABLE IF NOT EXISTS UserPermsCache (
        ResourceId INT,
        UserClass TEXT,
        CanView BOOL,
        PRIMARY KEY (ResourceId, UserClass(32)),
        INDEX (ResourceId),
        INDEX (UserClass(32))
);

UPDATE MetadataFields SET DefaultValue=NULL WHERE DefaultValue="";
