forked from pingcap/tidb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is an automated cherry-pick of pingcap#47740
Signed-off-by: ti-chi-bot <[email protected]>
- Loading branch information
1 parent
0540e51
commit c81b679
Showing
6 changed files
with
413 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
-- 1. Drop Schema | ||
drop database db_to_be_dropped; | ||
-- 2. Drop/Truncate Table | ||
drop table table_to_be_dropped_or_truncated.t0_dropped; | ||
drop table table_to_be_dropped_or_truncated.t1_dropped; | ||
truncate table table_to_be_dropped_or_truncated.t0_truncated; | ||
truncate table table_to_be_dropped_or_truncated.t1_truncated; | ||
-- 3. Drop/Truncate Table Partition | ||
alter table partition_to_be_dropped_or_truncated.t1_dropped drop partition p0; | ||
alter table partition_to_be_dropped_or_truncated.t1_truncated truncate partition p0; | ||
-- 4. Drop Table Index/PrimaryKey | ||
alter table index_or_primarykey_to_be_dropped.t0 drop index k1; | ||
alter table index_or_primarykey_to_be_dropped.t1 drop index k1; | ||
alter table index_or_primarykey_to_be_dropped.t0 drop primary key; | ||
alter table index_or_primarykey_to_be_dropped.t1 drop primary key; | ||
-- 5. Drop Table Indexes | ||
alter table indexes_to_be_dropped.t0 drop index k1, drop index k2; | ||
alter table indexes_to_be_dropped.t1 drop index k1, drop index k2; | ||
-- 6. Drop Table Column/Columns | ||
alter table column_s_to_be_dropped.t0_column drop column name; | ||
alter table column_s_to_be_dropped.t1_column drop column name; | ||
alter table column_s_to_be_dropped.t0_columns drop column name, drop column c; | ||
alter table column_s_to_be_dropped.t1_columns drop column name, drop column c; | ||
-- 7. Modify Table Column | ||
alter table column_to_be_modified.t0 modify column name varchar(25); |
Oops, something went wrong.