Skip to content

Commit 910ed37

Browse files
committed
Rm comment
1 parent d605091 commit 910ed37

1 file changed

Lines changed: 21 additions & 23 deletions

File tree

  • crates/vespertide-query/src

crates/vespertide-query/src/sql.rs

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,17 +1506,16 @@ mod tests {
15061506
DatabaseBackend::MySql,
15071507
&["ALTER TABLE `users` MODIFY COLUMN `age` varchar(50)"]
15081508
)]
1509-
// NOTE: SQLite does not support MODIFY COLUMN; see sea-query sqlite backend.
1510-
// #[case::modify_column_type_sqlite(
1511-
// "modify_column_type_sqlite",
1512-
// MigrationAction::ModifyColumnType {
1513-
// table: "users".into(),
1514-
// column: "age".into(),
1515-
// new_type: ColumnType::Complex(ComplexColumnType::Varchar { length: 50 }),
1516-
// },
1517-
// DatabaseBackend::Sqlite,
1518-
// &["ALTER TABLE \"users\" MODIFY COLUMN \"age\" VARCHAR(50)"]
1519-
// )]
1509+
#[case::modify_column_type_sqlite(
1510+
"modify_column_type_sqlite",
1511+
MigrationAction::ModifyColumnType {
1512+
table: "users".into(),
1513+
column: "age".into(),
1514+
new_type: ColumnType::Complex(ComplexColumnType::Varchar { length: 50 }),
1515+
},
1516+
DatabaseBackend::Sqlite,
1517+
&[]
1518+
)]
15201519
#[case::rename_table_action_postgres(
15211520
"rename_table_action_postgres",
15221521
MigrationAction::RenameTable {
@@ -2287,14 +2286,13 @@ mod tests {
22872286
.to_tbl(Alias::new("b"))
22882287
.to_col(Alias::new("id"))
22892288
.to_owned())),DatabaseBackend::MySql, &["ALTER TABLE `a` ADD CONSTRAINT `fk` FOREIGN KEY (`c`) REFERENCES `b` (`id`)"])]
2290-
// NOTE: SQLite does not support modifying FK constraints on existing tables; sea-query panics for these.
2291-
// #[case::create_foreign_key_sqlite("create_foreign_key_sqlite", BuiltQuery::CreateForeignKey(Box::new(ForeignKey::create()
2292-
// .name("fk")
2293-
// .from_tbl(Alias::new("a"))
2294-
// .from_col(Alias::new("c"))
2295-
// .to_tbl(Alias::new("b"))
2296-
// .to_col(Alias::new("id"))
2297-
// .to_owned())),DatabaseBackend::Sqlite, &["ALTER TABLE \"a\" ADD CONSTRAINT \"fk\" FOREIGN KEY (\"c\") REFERENCES \"b\" (\"id\")"])]
2289+
#[case::create_foreign_key_sqlite("create_foreign_key_sqlite", BuiltQuery::CreateForeignKey(Box::new(ForeignKey::create()
2290+
.name("fk")
2291+
.from_tbl(Alias::new("a"))
2292+
.from_col(Alias::new("c"))
2293+
.to_tbl(Alias::new("b"))
2294+
.to_col(Alias::new("id"))
2295+
.to_owned())),DatabaseBackend::Sqlite, &[])]
22982296
#[case::drop_foreign_key_postgres("drop_foreign_key_postgres", BuiltQuery::DropForeignKey(Box::new(ForeignKey::drop()
22992297
.name("fk")
23002298
.table(Alias::new("a"))
@@ -2303,10 +2301,10 @@ mod tests {
23032301
.name("fk")
23042302
.table(Alias::new("a"))
23052303
.to_owned())),DatabaseBackend::MySql, &["ALTER TABLE `a` DROP FOREIGN KEY `fk`"])]
2306-
// #[case::drop_foreign_key_sqlite("drop_foreign_key_sqlite", BuiltQuery::DropForeignKey(Box::new(ForeignKey::drop()
2307-
// .name("fk")
2308-
// .table(Alias::new("a"))
2309-
// .to_owned())),DatabaseBackend::Sqlite, &["ALTER TABLE \"a\" DROP CONSTRAINT \"fk\""])]
2304+
#[case::drop_foreign_key_sqlite("drop_foreign_key_sqlite", BuiltQuery::DropForeignKey(Box::new(ForeignKey::drop()
2305+
.name("fk")
2306+
.table(Alias::new("a"))
2307+
.to_owned())),DatabaseBackend::Sqlite, &[])]
23102308
fn test_build_query(
23112309
#[case] title: &str,
23122310
#[case] q: BuiltQuery,

0 commit comments

Comments
 (0)