Skip to content

Commit 0872326

Browse files
Drop --enable-ast-driver from the foreign key export scenario
The option is deprecated on this branch and prints a warning, which the scenario that came in with #40 does not expect. The other scenarios already run without it.
1 parent 6239eac commit 0872326

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎features/sqlite-export.feature‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,21 +215,21 @@ Feature: WP-CLI SQLite Export Command
215215
CREATE TABLE wp_zz_parent (id INTEGER PRIMARY KEY, name TEXT NOT NULL);
216216
INSERT INTO wp_zz_parent (id, name) VALUES (1, 'Parent Row');
217217
"""
218-
And I run `wp sqlite --enable-ast-driver import test_fk_source.sql`
219-
When I run `wp sqlite --enable-ast-driver export test_fk_export.sql --tables=wp_aa_child,wp_zz_parent`
218+
And I run `wp sqlite import test_fk_source.sql`
219+
When I run `wp sqlite export test_fk_export.sql --tables=wp_aa_child,wp_zz_parent`
220220
Then the file "test_fk_export.sql" should contain:
221221
"""
222222
CONSTRAINT `fk_parent` FOREIGN KEY (`parent_id`) REFERENCES `wp_zz_parent` (`id`)
223223
"""
224224
When I run `cat test_fk_export.sql`
225225
Then STDOUT should match /^SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO';\s+SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;\s+--\s+-- Table structure for table `wp_aa_child`.+-- Table structure for table `wp_zz_parent`.+SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;\s+SET SQL_MODE=@OLD_SQL_MODE;\s+-- Dump completed on \S+\n$/s
226226

227-
When I run `wp --exec="define( 'DB_PATH', getcwd() . '/test_fk_reimport.sqlite' );" sqlite --enable-ast-driver import test_fk_export.sql`
227+
When I run `wp --exec="define( 'DB_PATH', getcwd() . '/test_fk_reimport.sqlite' );" sqlite import test_fk_export.sql`
228228
Then STDOUT should contain:
229229
"""
230230
Success: Imported from 'test_fk_export.sql'.
231231
"""
232-
When I run `wp --exec="define( 'DB_PATH', getcwd() . '/test_fk_reimport.sqlite' );" sqlite --enable-ast-driver export - --tables=wp_aa_child,wp_zz_parent`
232+
When I run `wp --exec="define( 'DB_PATH', getcwd() . '/test_fk_reimport.sqlite' );" sqlite export - --tables=wp_aa_child,wp_zz_parent`
233233
Then STDOUT should contain:
234234
"""
235235
INSERT INTO `wp_aa_child` VALUES (1,1);

0 commit comments

Comments
 (0)