File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ use Phinx \Migration \AbstractMigration ;
4+ use Ramsey \Uuid \Uuid ;
5+ use Monarc \Core \Model \Entity \Translation ;
6+
7+ class FixIssueWithSpecificModel extends AbstractMigration
8+ {
9+ /**
10+ * Change Method.
11+ *
12+ * Write your reversible migrations using this method.
13+ *
14+ * More information on writing migrations is available here:
15+ * https://book.cakephp.org/phinx/0/en/migrations.html
16+ *
17+ * The following commands can be used in this method and Phinx will
18+ * automatically reverse them when rolling back:
19+ *
20+ * createTable
21+ * renameTable
22+ * addColumn
23+ * addCustomColumn
24+ * renameColumn
25+ * addIndex
26+ * addForeignKey
27+ *
28+ * Any other destructive changes will result in an error when trying to
29+ * rollback the migration.
30+ *
31+ * Remember to call "create()" or "update()" and NOT "save()" when working
32+ * with the Table class.
33+ */
34+ public function change ()
35+ {
36+ //force the mode to 0, to only have generic items in FO
37+ $ this ->execute ('UPDATE assets a SET a.mode = 0 ' );
38+ $ this ->execute ('UPDATE threats t SET t.mode = 0 ' );
39+ $ this ->execute ('UPDATE vulnerabilities v SET v.mode = 0 ' );
40+ $ this ->execute ('UPDATE objects o SET o.mode = 0 ' );
41+ }
42+
43+
44+ }
You can’t perform that action at this time.
0 commit comments