@@ -377,7 +377,7 @@ defmodule Ecto.Adapters.SQLite3.Connection do
377
377
end
378
378
379
379
@ impl true
380
- def execute_ddl ( { :drop , % Table { } = table , _mode } ) do
380
+ def execute_ddl ( { :drop , % Table { } = table } ) do
381
381
[
382
382
[
383
383
"DROP TABLE " ,
@@ -387,7 +387,12 @@ defmodule Ecto.Adapters.SQLite3.Connection do
387
387
end
388
388
389
389
@ impl true
390
- def execute_ddl ( { :drop_if_exists , % Table { } = table , _mode } ) do
390
+ def execute_ddl ( { :drop , % Table { } = table , _mode } ) do
391
+ execute_ddl ( { :drop , table } )
392
+ end
393
+
394
+ @ impl true
395
+ def execute_ddl ( { :drop_if_exists , % Table { } = table } ) do
391
396
[
392
397
[
393
398
"DROP TABLE IF EXISTS " ,
@@ -396,6 +401,11 @@ defmodule Ecto.Adapters.SQLite3.Connection do
396
401
]
397
402
end
398
403
404
+ @ impl true
405
+ def execute_ddl ( { :drop_if_exists , % Table { } = table , _mode } ) do
406
+ execute_ddl ( { :drop_if_exists , table } )
407
+ end
408
+
399
409
@ impl true
400
410
def execute_ddl ( { :alter , % Table { } = table , changes } ) do
401
411
Enum . map ( changes , fn change ->
@@ -449,7 +459,7 @@ defmodule Ecto.Adapters.SQLite3.Connection do
449
459
end
450
460
451
461
@ impl true
452
- def execute_ddl ( { :drop , % Index { } = index , _mode } ) do
462
+ def execute_ddl ( { :drop , % Index { } = index } ) do
453
463
[
454
464
[
455
465
"DROP INDEX " ,
@@ -459,7 +469,12 @@ defmodule Ecto.Adapters.SQLite3.Connection do
459
469
end
460
470
461
471
@ impl true
462
- def execute_ddl ( { :drop_if_exists , % Index { } = index , _mode } ) do
472
+ def execute_ddl ( { :drop , % Index { } = index , _mode } ) do
473
+ execute_ddl ( { :drop , index } )
474
+ end
475
+
476
+ @ impl true
477
+ def execute_ddl ( { :drop_if_exists , % Index { } = index } ) do
463
478
[
464
479
[
465
480
"DROP INDEX IF EXISTS " ,
@@ -468,6 +483,11 @@ defmodule Ecto.Adapters.SQLite3.Connection do
468
483
]
469
484
end
470
485
486
+ @ impl true
487
+ def execute_ddl ( { :drop_if_exists , % Index { } = index , _mode } ) do
488
+ execute_ddl ( { :drop_if_exists , index } )
489
+ end
490
+
471
491
@ impl true
472
492
def execute_ddl ( { :rename , % Table { } = current_table , % Table { } = new_table } ) do
473
493
[
@@ -552,7 +572,7 @@ defmodule Ecto.Adapters.SQLite3.Connection do
552
572
end
553
573
554
574
@ impl true
555
- def execute_ddl ( { :drop , % Index { } = index , _mode } ) do
575
+ def execute_ddl ( { :drop , % Index { } = index } ) do
556
576
[
557
577
[
558
578
"DROP INDEX " ,
@@ -562,7 +582,12 @@ defmodule Ecto.Adapters.SQLite3.Connection do
562
582
end
563
583
564
584
@ impl true
565
- def execute_ddl ( { :drop_if_exists , % Index { } = index , _mode } ) do
585
+ def execute_ddl ( { :drop , % Index { } = index , _mode } ) do
586
+ execute_ddl ( { :drop , index } )
587
+ end
588
+
589
+ @ impl true
590
+ def execute_ddl ( { :drop_if_exists , % Index { } = index } ) do
566
591
[
567
592
[
568
593
"DROP INDEX IF EXISTS " ,
@@ -571,6 +596,11 @@ defmodule Ecto.Adapters.SQLite3.Connection do
571
596
]
572
597
end
573
598
599
+ @ impl true
600
+ def execute_ddl ( { :drop_if_exists , % Index { } = index , _mode } ) do
601
+ execute_ddl ( { :drop_if_exists , index } )
602
+ end
603
+
574
604
@ impl true
575
605
def execute_ddl ( { :drop , % Constraint { } , _mode } ) do
576
606
raise ArgumentError , "SQLite3 does not support ALTER TABLE DROP CONSTRAINT."
0 commit comments