Skip to content

Commit 453ceae

Browse files
committed
Some backwards compatibility with sea-query
1 parent ae3c736 commit 453ceae

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/live/sqlite/src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ async fn test_002() -> DiscoveryResult<()> {
280280
[
281281
r#"CREATE TABLE "order" ("#,
282282
r#""id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,"#,
283-
r#""total" decimal,"#,
283+
r#""total" real(16, 4),"#,
284284
r#""bakery_id" integer NOT NULL,"#,
285285
r#""customer_id" integer NOT NULL,"#,
286286
r#""placed_at" datetime_text NOT NULL DEFAULT CURRENT_TIMESTAMP,"#,
@@ -295,7 +295,7 @@ async fn test_002() -> DiscoveryResult<()> {
295295
[
296296
r#"CREATE TABLE "lineitem" ("#,
297297
r#""id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,"#,
298-
r#""price" decimal,"#,
298+
r#""price" real(16, 4),"#,
299299
r#""quantity" integer,"#,
300300
r#""order_id" integer NOT NULL,"#,
301301
r#""cake_id" integer NOT NULL,"#,
@@ -383,7 +383,7 @@ fn create_order_table() -> TableCreateStatement {
383383
.auto_increment()
384384
.primary_key(),
385385
)
386-
.col(ColumnDef::new("total").decimal())
386+
.col(ColumnDef::new("total").decimal_len(16, 4))
387387
.col(ColumnDef::new("bakery_id").integer().not_null())
388388
.col(ColumnDef::new("customer_id").integer().not_null())
389389
.col(
@@ -432,7 +432,7 @@ fn create_lineitem_table() -> TableCreateStatement {
432432
.auto_increment()
433433
.primary_key(),
434434
)
435-
.col(ColumnDef::new("price").decimal())
435+
.col(ColumnDef::new("price").decimal_len(16, 4))
436436
.col(ColumnDef::new("quantity").integer())
437437
.col(ColumnDef::new("order_id").integer().not_null())
438438
.col(ColumnDef::new("cake_id").integer().not_null())

0 commit comments

Comments
 (0)