Skip to content

Commit c5700ff

Browse files
committed
Tweaks #996
1 parent e202c24 commit c5700ff

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

src/backend/mysql/table.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,8 @@ impl TableBuilder for MysqlQueryBuilder {
190190
sql.write_str(" TO ").unwrap();
191191
self.prepare_iden(to_name, sql);
192192
}
193-
TableAlterOption::DropColumn(DropColumnOption { column_name, if_exists }) => {
193+
TableAlterOption::DropColumn(DropColumnOption { column_name, .. }) => {
194194
sql.write_str("DROP COLUMN ").unwrap();
195-
if *if_exists{
196-
panic!("MySQL does not support drop column if exists");
197-
}
198195
self.prepare_iden(column_name, sql);
199196
}
200197
TableAlterOption::DropForeignKey(name) => {

src/backend/sqlite/table.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,8 @@ impl TableBuilder for SqliteQueryBuilder {
6262
sql.write_str(" TO ").unwrap();
6363
self.prepare_iden(to_name, sql);
6464
}
65-
TableAlterOption::DropColumn(DropColumnOption {
66-
column_name,
67-
if_exists,
68-
}) => {
65+
TableAlterOption::DropColumn(DropColumnOption { column_name, .. }) => {
6966
sql.write_str("DROP COLUMN ").unwrap();
70-
if *if_exists {
71-
panic!("Sqlite does not support drop column if exists");
72-
}
7367
self.prepare_iden(column_name, sql);
7468
}
7569
TableAlterOption::DropForeignKey(_) => {

0 commit comments

Comments
 (0)