Skip to content

Commit a607e1d

Browse files
author
Igor Polevoy
committed
#450 Implement multiple tables with same model (sharding) - typos
1 parent e85691f commit a607e1d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

activejdbc/src/test/resources/oracle_schema.sql

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,19 @@ FOR EACH ROW
6666

6767

6868
-- BREAK
69-
CREATE TABLE shard1_temperatures (id NUMBER NOT NULL, temp NUMBER)
69+
CREATE TABLE shard2_temperatures (id NUMBER NOT NULL, temp NUMBER)
7070
-- BREAK
71-
ALTER TABLE shard1_temperatures ADD CONSTRAINT shard1_temperatures_pk PRIMARY KEY ( id )
71+
ALTER TABLE shard2_temperatures ADD CONSTRAINT shard2_temperatures_pk PRIMARY KEY ( id )
7272
-- BREAK
73-
CREATE SEQUENCE shard1_temperatures_seq START WITH 1 INCREMENT BY 1
73+
CREATE SEQUENCE shard2_temperatures_seq START WITH 1 INCREMENT BY 1
7474
-- BREAK
75-
CREATE OR REPLACE TRIGGER shard1_temperatures_trigger
76-
BEFORE INSERT ON shard1_temperatures REFERENCING
75+
CREATE OR REPLACE TRIGGER shard2_temperatures_trigger
76+
BEFORE INSERT ON shard2_temperatures REFERENCING
7777
NEW AS new
7878
OLD AS old
7979
FOR EACH ROW
8080
begin
81-
select coalesce(:new.id, shard1_temperatures_seq.nextval) into :new.id from dual;
81+
select coalesce(:new.id, shard2_temperatures_seq.nextval) into :new.id from dual;
8282
end;
8383

8484

0 commit comments

Comments
 (0)