<commit_before>-- noinspection SqlNoDataSourceInspectionForFile

CREATE TABLE people (id  NUMBER NOT NULL, name VARCHAR(56) NOT NULL, last_name VARCHAR(56), dob DATE, graduation_date DATE, created_at TIMESTAMP, updated_at TIMESTAMP)
-- BREAK
ALTER TABLE people ADD CONSTRAINT people_pk PRIMARY KEY ( id )
-- BREAK
CREATE SEQUENCE people_seq START WITH 1 INCREMENT BY 1
-- BREAK
CREATE OR REPLACE TRIGGER people_trigger
    BEFORE INSERT ON people REFERENCING
    NEW AS new
    OLD AS old
    FOR EACH ROW
    begin
select coalesce(:new.id, people_seq.nextval) into :new.id from dual;
end;

-- BREAK
CREATE TABLE accounts (id  NUMBER NOT NULL, account VARCHAR(56), description VARCHAR(56), amount NUMBER(10,2), total NUMBER(10,2))
-- BREAK
ALTER TABLE accounts ADD CONSTRAINT accounts_pk PRIMARY KEY ( id )
-- BREAK
CREATE SEQUENCE accounts_seq START WITH 1 INCREMENT BY 1
-- BREAK
CREATE OR REPLACE TRIGGER accounts_trigger
    BEFORE INSERT ON accounts REFERENCING
    NEW AS new
    OLD AS old
    FOR EACH ROW
    begin
select coalesce(:new.id, accounts_seq.nextval) into :new.id from dual;
end;

-- BREAK
CREATE TABLE temperatures (id  NUMBER NOT NULL, temp NUMBER)
-- BREAK
ALTER TABLE temperatures ADD CONSTRAINT temperatures_pk PRIMARY KEY ( id )
-- BREAK
CREATE SEQUENCE temperatures_seq START WITH 1 INCREMENT BY 1
-- BREAK
CREATE OR REPLACE TRIGGER temperatures_trigger
    BEFORE INSERT ON temperatures REFERENCING
    NEW AS new
    OLD AS old
    FOR EACH ROW
    begin
select coalesce(:new.id, temperatures_seq.nextval) into :new.id from dual;
end;


-- BREAK
CREATE TABLE shard1_temperatures (id  NUMBER NOT NULL, temp NUMBER)
-- BREAK
ALTER TABLE shard1_temperatures ADD CONSTRAINT shard1_temperatures_pk PRIMARY KEY ( id )
-- BREAK
CREATE SEQUENCE shard1_temperatures_seq START WITH 1 INCREMENT BY 1
-- BREAK
CREATE OR REPLACE TRIGGER shard1_temperatures_trigger
BEFORE INSERT ON shard1_temperatures REFERENCING
    NEW AS new
    OLD AS old
FOR EACH ROW
    begin
        select coalesce(:new.id, shard1_temperatures_seq.nextval) into :new.id from dual;
    end;


-- BREAK
CREATE TABLE shard1_temperatures (id  NUMBER NOT NULL, temp NUMBER)
-- BREAK
ALTER TABLE shard1_temperatures ADD CONSTRAINT shard1_temperatures_pk PRIMARY KEY ( id )
-- BREAK
CREATE SEQUENCE shard1_temperatures_seq START WITH 1 INCREMENT BY 1
-- BREAK
CREATE OR REPLACE TRIGGER shard1_temperatures_trigger
BEFORE INSERT ON shard1_temperatures REFERENCING
    NEW AS new
    OLD AS old
FOR EACH ROW
    begin
        select coalesce(:new.id, shard1_temperatures_seq.nextval) into :new.id from dual;
    end;


-- BREAK
CREATE TABLE salaries (id  NUMBER NOT NULL, salary NUMBER(7, 2))
-- BREAK
ALTER TABLE salaries ADD CONSTRAINT salaries_pk PRIMARY KEY ( id )
-- BREAK
CREATE SEQUENCE salaries_seq START WITH 1 INCREMENT BY 1
-- BREAK
CREATE OR REPLACE TRIGGER salaries_trigger
    BEFORE INSERT ON salaries REFERENCING
    NEW AS new
    OLD AS old
    FOR EACH ROW
    begin
select coalesce(:new.id, salaries_seq.nextval) into :new.id from dual;
end;


<commit_msg>#450 Implement multiple tables with same model (sharding) - typos<commit_after>-- noinspection SqlNoDataSourceInspectionForFile

CREATE TABLE people (id  NUMBER NOT NULL, name VARCHAR(56) NOT NULL, last_name VARCHAR(56), dob DATE, graduation_date DATE, created_at TIMESTAMP, updated_at TIMESTAMP)
-- BREAK
ALTER TABLE people ADD CONSTRAINT people_pk PRIMARY KEY ( id )
-- BREAK
CREATE SEQUENCE people_seq START WITH 1 INCREMENT BY 1
-- BREAK
CREATE OR REPLACE TRIGGER people_trigger
    BEFORE INSERT ON people REFERENCING
    NEW AS new
    OLD AS old
    FOR EACH ROW
    begin
select coalesce(:new.id, people_seq.nextval) into :new.id from dual;
end;

-- BREAK
CREATE TABLE accounts (id  NUMBER NOT NULL, account VARCHAR(56), description VARCHAR(56), amount NUMBER(10,2), total NUMBER(10,2))
-- BREAK
ALTER TABLE accounts ADD CONSTRAINT accounts_pk PRIMARY KEY ( id )
-- BREAK
CREATE SEQUENCE accounts_seq START WITH 1 INCREMENT BY 1
-- BREAK
CREATE OR REPLACE TRIGGER accounts_trigger
    BEFORE INSERT ON accounts REFERENCING
    NEW AS new
    OLD AS old
    FOR EACH ROW
    begin
select coalesce(:new.id, accounts_seq.nextval) into :new.id from dual;
end;

-- BREAK
CREATE TABLE temperatures (id  NUMBER NOT NULL, temp NUMBER)
-- BREAK
ALTER TABLE temperatures ADD CONSTRAINT temperatures_pk PRIMARY KEY ( id )
-- BREAK
CREATE SEQUENCE temperatures_seq START WITH 1 INCREMENT BY 1
-- BREAK
CREATE OR REPLACE TRIGGER temperatures_trigger
    BEFORE INSERT ON temperatures REFERENCING
    NEW AS new
    OLD AS old
    FOR EACH ROW
    begin
select coalesce(:new.id, temperatures_seq.nextval) into :new.id from dual;
end;


-- BREAK
CREATE TABLE shard1_temperatures (id  NUMBER NOT NULL, temp NUMBER)
-- BREAK
ALTER TABLE shard1_temperatures ADD CONSTRAINT shard1_temperatures_pk PRIMARY KEY ( id )
-- BREAK
CREATE SEQUENCE shard1_temperatures_seq START WITH 1 INCREMENT BY 1
-- BREAK
CREATE OR REPLACE TRIGGER shard1_temperatures_trigger
BEFORE INSERT ON shard1_temperatures REFERENCING
    NEW AS new
    OLD AS old
FOR EACH ROW
    begin
        select coalesce(:new.id, shard1_temperatures_seq.nextval) into :new.id from dual;
    end;


-- BREAK
CREATE TABLE shard2_temperatures (id  NUMBER NOT NULL, temp NUMBER)
-- BREAK
ALTER TABLE shard2_temperatures ADD CONSTRAINT shard2_temperatures_pk PRIMARY KEY ( id )
-- BREAK
CREATE SEQUENCE shard2_temperatures_seq START WITH 1 INCREMENT BY 1
-- BREAK
CREATE OR REPLACE TRIGGER shard2_temperatures_trigger
BEFORE INSERT ON shard2_temperatures REFERENCING
    NEW AS new
    OLD AS old
FOR EACH ROW
    begin
        select coalesce(:new.id, shard2_temperatures_seq.nextval) into :new.id from dual;
    end;


-- BREAK
CREATE TABLE salaries (id  NUMBER NOT NULL, salary NUMBER(7, 2))
-- BREAK
ALTER TABLE salaries ADD CONSTRAINT salaries_pk PRIMARY KEY ( id )
-- BREAK
CREATE SEQUENCE salaries_seq START WITH 1 INCREMENT BY 1
-- BREAK
CREATE OR REPLACE TRIGGER salaries_trigger
    BEFORE INSERT ON salaries REFERENCING
    NEW AS new
    OLD AS old
    FOR EACH ROW
    begin
select coalesce(:new.id, salaries_seq.nextval) into :new.id from dual;
end;



{'fraction_non_alphanumeric': 0.05445705024311183, 'fraction_numerical': 0.014100486223662886, 'mean_word_length': 3.924980047885076, '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': '3908', 'n_tokens_mistral': 2225, 'n_tokens_neox': 1970, 'n_words': 758}