<commit_before>﻿﻿-- PostgreSQL database creation script for DeviceHive
DROP TABLE IF EXISTS device_command;
DROP TABLE IF EXISTS device_equipment;
DROP TABLE IF EXISTS device_notification;
DROP TABLE IF EXISTS device;
DROP TABLE IF EXISTS equipment;
DROP TABLE IF EXISTS device_class;
DROP TABLE IF EXISTS network;
DROP TABLE IF EXISTS "user";
DROP TABLE IF EXISTS user_network;


CREATE TABLE network (
    id BIGSERIAL NOT NULL,
    name VARCHAR(128) NOT NULL,
    description VARCHAR(128) NULL,
    key VARCHAR(64) NULL
);

ALTER TABLE network ADD CONSTRAINT network_pk PRIMARY KEY (id);

CREATE TABLE "user" (
    id BIGSERIAL NOT NULL,
    login VARCHAR(64) NOT NULL,
    password_hash VARCHAR(48) NOT NULL,
    password_salt VARCHAR(24) NOT NULL,
    role INT NOT NULL,
    status INT NOT NULL,<commit_msg>Updated FlyWay database creation script<commit_after>﻿-- PostgreSQL database creation script for DeviceHive
CREATE TABLE network (
    id BIGSERIAL NOT NULL,
    name VARCHAR(128) NOT NULL,
    description VARCHAR(128) NULL,
    key VARCHAR(64) NULL
);

ALTER TABLE network ADD CONSTRAINT network_pk PRIMARY KEY (id);

CREATE TABLE "user" (
    id BIGSERIAL NOT NULL,
    login VARCHAR(64) NOT NULL,
    password_hash VARCHAR(48) NOT NULL,
    password_salt VARCHAR(24) NOT NULL,
    role INT NOT NULL,
    status INT NOT NULL,
{'fraction_non_alphanumeric': 0.06273338312173264, 'fraction_numerical': 0.020911127707244213, 'mean_word_length': 4.075757575757576, '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': '2977064', 'n_tokens_mistral': 445, 'n_tokens_neox': 394, 'n_words': 168}