Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
*: simplify sql file in online ddl test
Browse files Browse the repository at this point in the history
  • Loading branch information
amyangfei committed Mar 16, 2019
1 parent 99d5039 commit dfba24d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions tests/online_ddl/data/db1.increment.sql
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ insert into t1 (uid, name, info) values (10004, 'Buenos Aires', '{"age": 10}');
insert into t2 (uid, name, info) values (20005, 'Buenos Aires', '{"age": 100}');
insert into t2 (uid, name, info) values (20006, 'Buenos Aires', '{"age": 1000}');
alter table t1 add column info_json json GENERATED ALWAYS AS (`info`) VIRTUAL;
alter table t1 add column id_gen int as (uid + 1);
alter table t2 add column id_gen int as (uid + 1);
alter table t1 add unique (id_gen);
alter table t2 add unique (id_gen);
alter table t2 add key name (name);
alter table t1 add key name (name);
insert into t1 (uid, name, info) values (10005, 'Buenos Aires', '{"age": 100}');
insert into t2 (uid, name, info) values (20007, 'Buenos Aires', '{"age": 200}');
6 changes: 2 additions & 4 deletions tests/online_ddl/data/db2.increment.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ update t3 set age = 1;
alter table t2 add column info_json json GENERATED ALWAYS AS (`info`) VIRTUAL;
update t3 set age = age + 10;
alter table t3 add column info_json json GENERATED ALWAYS AS (`info`) VIRTUAL;
alter table t3 add column id_gen int as (uid + 1);
alter table t2 add column id_gen int as (uid + 1);
alter table t2 add unique (id_gen);
alter table t3 add unique (id_gen);
alter table t2 add key name (name);
alter table t3 add key name (name);
update t2 set age = age + 10;

0 comments on commit dfba24d

Please sign in to comment.