 WITH LOCAL CHECK OPTION;
 
 --
--- File Image
+-- Image
 --
 
 CREATE VIEW image AS


CREATE INDEX ON account (role_id);
CREATE INDEX ON account (created);

--
-- File
--

CREATE TABLE file (
    id serial PRIMARY KEY,
    name varchar(255) NOT NULL UNIQUE,
    entity_id varchar(50) NOT NULL,
    mime varchar(255) NOT NULL,
    thumb varchar(255) DEFAULT null UNIQUE,
    info text DEFAULT null,
    created timestamp(0) NOT NULL DEFAULT current_timestamp
);

CREATE INDEX ON file (entity_id);
CREATE INDEX ON file (created);

--
-- Page

WITH LOCAL CHECK OPTION;

--
-- Video
--

CREATE VIEW video AS
