You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 00a2f81
Browse filesBrowse the repository at this point in the historyBrowse files
INSERT INTO wp_zz_parent (id, name) VALUES (1, 'Parent Row');
217
217
"""
218
218
And I run `wp sqlite --enable-ast-driver import test_fk_source.sql`
219
-
When I run `wp sqlite --enable-ast-driver export - --tables=wp_aa_child,wp_zz_parent`
220
-
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/s
219
+
When I run `wp sqlite --enable-ast-driver export test_fk_export.sql --tables=wp_aa_child,wp_zz_parent`
220
+
Then the file "test_fk_export.sql" should contain:
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
226
+
227
+
When I run `wp --exec="define( 'DB_PATH', getcwd() . '/test_fk_reimport.sqlite' );" sqlite --enable-ast-driver import test_fk_export.sql`
228
+
Then STDOUT should contain:
229
+
"""
230
+
Success: Imported from 'test_fk_export.sql'.
231
+
"""
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`
233
+
Then STDOUT should contain:
234
+
"""
235
+
INSERT INTO `wp_aa_child` VALUES (1,1);
236
+
"""
237
+
And STDOUT should contain:
238
+
"""
239
+
INSERT INTO `wp_zz_parent` VALUES (1,'Parent Row');
0 commit comments