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
The options in FixtureTask were not as comprehensive as they needed to
be. Previously the records flag was overloaded to do 2 jobs. It signaled
that you wanted to pull records from the live table, and if schema was
present that you wanted to import records at runtime. It was not
possible to express a fixture that imported schema, but pulled records
in from the live table at time of generation.
Copy file name to clipboardExpand all lines: src/Console/Command/Task/FixtureTask.php
+21-44Lines changed: 21 additions & 44 deletions
Original file line number
Diff line number
Diff line change
@@ -71,9 +71,12 @@ public function getOptionParser() {
71
71
'short' => 's',
72
72
'boolean' => true
73
73
])->addOption('records', [
74
-
'help' => __d('cake_console', 'Used with --count and <name>/all commands to pull [n] records from the live tables, where [n] is either --count or the default of 10.'),
74
+
'help' => __d('cake_console', 'Generate a fixture with records from the non-test database. Used with --count and --conditions to limit which records are added to the fixture.'),
75
75
'short' => 'r',
76
76
'boolean' => true
77
+
])->addOption('import-records', [
78
+
'help' => __d('cake_console', 'Set to true to import records from the live table when the generated fixture is used.'),
79
+
'boolean' => true
77
80
])->addOption('conditions', [
78
81
'help' => __d('cake_console', 'The SQL snippet to use when importing records.'),
0 commit comments