<commit_before>-- This file is part of dirtsand.
--
-- dirtsand is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Affero General Public License as
-- published by the Free Software Foundation, either version 3 of the
-- License, or (at your option) any later version.
--
-- dirtsand is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU Affero General Public License for more details.
--
-- You should have received a copy of the GNU Affero General Public License
-- along with dirtsand.  If not, see <http://www.gnu.org/licenses/>.
-------------------------------------------------------------------------------
-- DirtSand DB initialization script --

\connect dirtsand

SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

CREATE SCHEMA auth;
ALTER SCHEMA auth OWNER TO dirtsand;

CREATE SCHEMA game;
ALTER SCHEMA game OWNER TO dirtsand;

CREATE SCHEMA vault;
ALTER SCHEMA vault OWNER TO dirtsand;

SET search_path = auth, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;

CREATE TABLE "Accounts" (
    idx integer NOT NULL,
    "Login" character varying(64) NOT NULL,
    "PassHash" character(40) NOT NULL,
    "AcctUuid" uuid NOT NULL,
    "AcctFlags" integer DEFAULT 0 NOT NULL,
    "BillingType" integer DEFAULT 0 NOT NULL
);
ALTER TABLE auth."Accounts" OWNER TO dirtsand;

CREATE SEQUENCE "Accounts_idx_seq"
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;
ALTER TABLE auth."Accounts_idx_seq" OWNER TO dirtsand;
ALTER SEQUENCE "Accounts_idx_seq" OWNED BY "Accounts".idx;
SELECT pg_catalog.setval('"Accounts_idx_seq"', 1, false);

CREATE TABLE "Players" (
    idx integer NOT NULL,
    "AcctUuid" uuid NOT NULL,
    "PlayerIdx" integer NOT NULL,
    "PlayerName" character varying(40) NOT NULL,
    "AvatarShape" character varying(64) NOT NULL,
    "Explorer" integer DEFAULT 1 NOT NULL
);
ALTER TABLE auth."Players" OWNER TO dirtsand;

CREATE SEQUENCE "Players_idx_seq"
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;
ALTER TABLE auth."Players_idx_seq" OWNER TO dirtsand;
ALTER SEQUENCE "Players_idx_seq" OWNED BY "Players".idx;
SELECT pg_catalog.setval('"Players_idx_seq"', 1, false);

CREATE TABLE "Scores" (
    idx integer NOT NULL,
    "CreateTime" integer DEFAULT 0 NOT NULL,
    "OwnerIdx" integer NOT NULL,
    "Type" integer DEFAULT 1 NOT NULL,
    "Name" character varying(64) NOT NULL,
    "Points" integer DEFAULT 0 NOT NULL
);
ALTER TABLE auth."Scores" OWNER TO dirtsand;
CREATE INDEX ON auth."Scores" ("OwnerIdx", "Name");<commit_msg>Fix missing index name on scores table<commit_after>-- This file is part of dirtsand.
--
-- dirtsand is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Affero General Public License as
-- published by the Free Software Foundation, either version 3 of the
-- License, or (at your option) any later version.
--
-- dirtsand is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-- GNU Affero General Public License for more details.
--
-- You should have received a copy of the GNU Affero General Public License
-- along with dirtsand.  If not, see <http://www.gnu.org/licenses/>.
-------------------------------------------------------------------------------
-- DirtSand DB initialization script --

\connect dirtsand

SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;

CREATE SCHEMA auth;
ALTER SCHEMA auth OWNER TO dirtsand;

CREATE SCHEMA game;
ALTER SCHEMA game OWNER TO dirtsand;

CREATE SCHEMA vault;
ALTER SCHEMA vault OWNER TO dirtsand;

SET search_path = auth, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;

CREATE TABLE "Accounts" (
    idx integer NOT NULL,
    "Login" character varying(64) NOT NULL,
    "PassHash" character(40) NOT NULL,
    "AcctUuid" uuid NOT NULL,
    "AcctFlags" integer DEFAULT 0 NOT NULL,
    "BillingType" integer DEFAULT 0 NOT NULL
);
ALTER TABLE auth."Accounts" OWNER TO dirtsand;

CREATE SEQUENCE "Accounts_idx_seq"
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;
ALTER TABLE auth."Accounts_idx_seq" OWNER TO dirtsand;
ALTER SEQUENCE "Accounts_idx_seq" OWNED BY "Accounts".idx;
SELECT pg_catalog.setval('"Accounts_idx_seq"', 1, false);

CREATE TABLE "Players" (
    idx integer NOT NULL,
    "AcctUuid" uuid NOT NULL,
    "PlayerIdx" integer NOT NULL,
    "PlayerName" character varying(40) NOT NULL,
    "AvatarShape" character varying(64) NOT NULL,
    "Explorer" integer DEFAULT 1 NOT NULL
);
ALTER TABLE auth."Players" OWNER TO dirtsand;

CREATE SEQUENCE "Players_idx_seq"
    START WITH 1
    INCREMENT BY 1
    NO MAXVALUE
    NO MINVALUE
    CACHE 1;
ALTER TABLE auth."Players_idx_seq" OWNER TO dirtsand;
ALTER SEQUENCE "Players_idx_seq" OWNED BY "Players".idx;
SELECT pg_catalog.setval('"Players_idx_seq"', 1, false);

CREATE TABLE "Scores" (
    idx integer NOT NULL,
    "CreateTime" integer DEFAULT 0 NOT NULL,
    "OwnerIdx" integer NOT NULL,
    "Type" integer DEFAULT 1 NOT NULL,
    "Name" character varying(64) NOT NULL,
    "Points" integer DEFAULT 0 NOT NULL
);
ALTER TABLE auth."Scores" OWNER TO dirtsand;
CREATE INDEX "Score_Index" ON auth."Scores" ("OwnerIdx", "Name");
{'fraction_non_alphanumeric': 0.10708661417322834, 'fraction_numerical': 0.009098862642169728, 'mean_word_length': 3.465625, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '598893', 'n_tokens_mistral': 1822, 'n_tokens_neox': 1725, 'n_words': 698}