<commit_before>-- Script: create_database.sql
--
-- Description: Creates (or recreates) the ABRAID-MP database itself. Must be run as a user that is able to create databases.
--
-- Parameters:
--      database_name: The ABRAID-MP database name
--      application_username: The ABRAID-MP application's username
--      application_password: <PASSWORD>
--
-- Copyright (c) 2014 University of Oxford

SET client_min_messages TO WARNING;

-- Drop and create the database
DROP DATABASE IF EXISTS :database_name;
CREATE DATABASE :database_name;

-- Change context to the newly-created database
\c :database_name

-- Enable PostGIS
CREATE EXTENSION postgis;

-- Create schema objects
\i tables.sql
\i views.sql
\i constraints.sql
\i indexes.sql
\i roles.sql
<commit_msg>Set database character set to UTF-8<commit_after>-- Script: create_database.sql
--
-- Description: Creates (or recreates) the ABRAID-MP database itself. Must be run as a user that is able to create databases.
--
-- Parameters:
--      database_name: The ABRAID-MP database name
--      application_username: The ABRAID-MP application's username
--      application_password: <PASSWORD>
--
-- Copyright (c) 2014 University of Oxford

SET client_min_messages TO WARNING;

-- Drop and create the database
DROP DATABASE IF EXISTS :database_name;
CREATE DATABASE :database_name ENCODING 'UTF8';

-- Change context to the newly-created database
\c :database_name

-- Enable PostGIS
CREATE EXTENSION postgis;

-- Create schema objects
\i tables.sql
\i views.sql
\i constraints.sql
\i indexes.sql
\i roles.sql

{'fraction_non_alphanumeric': 0.09003831417624521, 'fraction_numerical': 0.006385696040868455, 'mean_word_length': 3.649851632047478, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3181356', 'n_tokens_mistral': 490, 'n_tokens_neox': 465, 'n_words': 177}