<commit_before>
CREATE TABLE monad_page (
    id SERIAL PRIMARY KEY,
    parent INTEGER REFERENCES monad_page(id) ON DELETE SET NULL,
    owner INTEGER REFERENCES monolyth_auth(id) ON DELETE CASCADE,
    sortorder INTEGER NOT NULL DEFAULT 0,
    datecreated timestamp with time zone NOT NULL DEFAULT NOW(),
    datemodified timestamp with time zone,
    usermodified INTEGER REFERENCES monolyth_auth(id) ON DELETE SET NULL,
    viewname varchar(255) NOT NULL DEFAULT E'monad\\page/generic',
    viewprepend varchar(255),
    viewappend varchar(255)
);
CREATE INDEX monad_page_parent_key ON monad_page(parent);
CREATE INDEX monad_page_owner_key ON monad_page(owner);
CREATE INDEX monad_page_sortorder_key ON monad_page(sortorder);
CREATE INDEX monad_page_datecreated_key ON monad_page(datecreated);
CREATE INDEX monad_page_usermodified_key ON monad_page(usermodified);

CREATE TABLE monad_page_i18n (
    id INTEGER REFERENCES monad_page(id) ON DELETE CASCADE,
    language INTEGER NOT NULL REFERENCES monolyth_language(id) ON DELETE CASCADE,
    title varchar(255) NOT NULL,
    slug varchar(255) NOT NULL,
    content text,
    keywords varchar(255),
    description text,
    status INTEGER NOT NULL DEFAULT 0,
    PRIMARY KEY(id, language)
);
CREATE UNIQUE INDEX monad_page_i18n_language_slug_key ON monad_page_i18n(language, slug);

CREATE TABLE monad_section (
    id SERIAL NOT NULL PRIMARY KEY,
    datecreated timestamp with time zone NOT NULL DEFAULT NOW(),
    datemodified timestamp with time zone,
    viewname varchar(255) NOT NULL DEFAULT E'monad\\slice/section'
);

CREATE TABLE monad_section_i18n (
    id INTEGER NOT NULL REFERENCES monad_section(id) ON DELETE CASCADE,
    language INTEGER NOT NULL REFERENCES monolyth_language(id) ON DELETE CASCADE,
    header text,
    content text,
    footer text,
    PRIMARY KEY(id, language)
);

CREATE TABLE monad_section_link_page (
    section INTEGER NOT NULL REFERENCES monad_section(id) ON DELETE CASCADE,
    page INTEGER NOT NULL REFERENCES monad_page(id) ON DELETE CASCADE,
    parent INTEGER NOT NULL REFERENCES monad_section(id) ON DELETE SET NULL,
    sortorder INTEGER NOT NULL,
    PRIMARY KEY(section, page)
);
CREATE INDEX monad_section_link_page_parent_key ON monad_section_link_page(parent);
CREATE INDEX monad_section_link_page_sortorder_key ON monad_section_link_page(sortorder);

CREATE TABLE monad_menu (
    id SERIAL NOT NULL PRIMARY KEY,
    owner INTEGER NOT NULL REFERENCES monolyth_auth(id) ON DELETE CASCADE,
    status INTEGER NOT NULL DEFAULT 0,
    datecreated timestamp with time zone NOT NULL DEFAULT NOW(),
    datemodified timestamp with time zone,
    usermodified INTEGER REFERENCES monolyth_auth(id) ON DELETE SET NULL
);
CREATE INDEX monad_menu_owner_key ON monad_menu(owner);
CREATE INDEX monad_menu_status_key ON monad_menu(status);
CREATE INDEX monad_menu_usermodified_key ON monad_menu(usermodified);

CREATE TABLE monad_menu_i18n (<commit_msg>rename this one too<commit_after>
CREATE TABLE monad_page (
    id SERIAL PRIMARY KEY,
    parent INTEGER REFERENCES monad_page(id) ON DELETE SET NULL,
    owner INTEGER REFERENCES monolyth_auth(id) ON DELETE CASCADE,
    sortorder INTEGER NOT NULL DEFAULT 0,
    datecreated timestamp with time zone NOT NULL DEFAULT NOW(),
    datemodified timestamp with time zone,
    usermodified INTEGER REFERENCES monolyth_auth(id) ON DELETE SET NULL,
    viewname varchar(255) NOT NULL DEFAULT E'monad\\page/generic',
    viewprepend varchar(255),
    viewappend varchar(255)
);
CREATE INDEX monad_page_parent_key ON monad_page(parent);
CREATE INDEX monad_page_owner_key ON monad_page(owner);
CREATE INDEX monad_page_sortorder_key ON monad_page(sortorder);
CREATE INDEX monad_page_datecreated_key ON monad_page(datecreated);
CREATE INDEX monad_page_usermodified_key ON monad_page(usermodified);

CREATE TABLE monad_page_i18n (
    id INTEGER REFERENCES monad_page(id) ON DELETE CASCADE,
    language INTEGER NOT NULL REFERENCES monolyth_language(id) ON DELETE CASCADE,
    title varchar(255) NOT NULL,
    slug varchar(255) NOT NULL,
    content text,
    keywords varchar(255),
    description text,
    status INTEGER NOT NULL DEFAULT 0,
    PRIMARY KEY(id, language)
);
CREATE UNIQUE INDEX monad_page_i18n_language_slug_key ON monad_page_i18n(language, slug);

CREATE TABLE monad_section (
    id SERIAL NOT NULL PRIMARY KEY,
    datecreated timestamp with time zone NOT NULL DEFAULT NOW(),
    datemodified timestamp with time zone,
    viewname varchar(255) NOT NULL DEFAULT E'monad\\slice/section'
);

CREATE TABLE monad_section_i18n (
    id INTEGER NOT NULL REFERENCES monad_section(id) ON DELETE CASCADE,
    language INTEGER NOT NULL REFERENCES monolyth_language(id) ON DELETE CASCADE,
    header text,
    content text,
    footer text,
    PRIMARY KEY(id, language)
);

CREATE TABLE monad_page_section (
    section INTEGER NOT NULL REFERENCES monad_section(id) ON DELETE CASCADE,
    page INTEGER NOT NULL REFERENCES monad_page(id) ON DELETE CASCADE,
    parent INTEGER NOT NULL REFERENCES monad_section(id) ON DELETE SET NULL,
    sortorder INTEGER NOT NULL,
    PRIMARY KEY(section, page)
);
CREATE INDEX monad_section_link_page_parent_key ON monad_section_link_page(parent);
CREATE INDEX monad_section_link_page_sortorder_key ON monad_section_link_page(sortorder);

CREATE TABLE monad_menu (
    id SERIAL NOT NULL PRIMARY KEY,
    owner INTEGER NOT NULL REFERENCES monolyth_auth(id) ON DELETE CASCADE,
    status INTEGER NOT NULL DEFAULT 0,
    datecreated timestamp with time zone NOT NULL DEFAULT NOW(),
    datemodified timestamp with time zone,
    usermodified INTEGER REFERENCES monolyth_auth(id) ON DELETE SET NULL
);
CREATE INDEX monad_menu_owner_key ON monad_menu(owner);
CREATE INDEX monad_menu_status_key ON monad_menu(status);
CREATE INDEX monad_menu_usermodified_key ON monad_menu(usermodified);

CREATE TABLE monad_menu_i18n (
{'fraction_non_alphanumeric': 0.051908396946564885, 'fraction_numerical': 0.011535199321458864, 'mean_word_length': 4.991869918699187, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7216253', 'n_tokens_mistral': 2016, 'n_tokens_neox': 1865, 'n_words': 615}