Browse Source

Merge remote-tracking branch 'origin/FD3-641'

Luciano Andrade 6 years ago
parent
commit
cd6a521ffc

File diff suppressed because it is too large
+ 13 - 140
app/DoctrineMigrations/src/action.yml


File diff suppressed because it is too large
+ 1 - 0
app/DoctrineMigrations/src/template.yml


+ 1 - 3
app/DoctrineMigrations/src/workflow.yml

@@ -29,7 +29,6 @@ insertorupdate:
           enable: 1
           support: "a:1:{i:0;s:21:\"FTTHBundle\\Entity\\ONU\";}"
           owner: 1
-          used_by_default: 1
         -
           id: 3
           name: "onu_workflow_2"
@@ -37,11 +36,10 @@ insertorupdate:
           marking_type: "single_state"
           marking_name: "currentState"
           description: "ONU Workflow v2"
-          template: "initial_place: active\r\nplaces:\r\n  - active\r\n  - disable\r\n  - deleted\r\ntransitions:\r\n  active:\r\n    from: disable\r\n    to: active\r\n  disable_deleted:\r\n    from: disable\r\n    to: deleted\r\n  add_config:\r\n    from: active\r\n    to: active\r\n  disable:\r\n    from: active\r\n    to: disable\r\n  active_deleted:\r\n    from: active\r\n    to: deleted"
+          template: "initial_place: active\r\nplaces:\r\n  - active\r\n  - disable\r\n  - deleted\r\ntransitions:\r\n  active:\r\n    from: disable\r\n    to: active\r\n  disable_deleted:\r\n    from: disable\r\n    to: deleted\r\n  add_config:\r\n    from: active\r\n    to: active\r\n  disable:\r\n    from: active\r\n    to: disable\r\n  active_deleted:\r\n    from: active\r\n    to: deleted\r\n  deleted_active:\r\n    from: deleted\r\n    to: active"
           created: "2018-08-06 17:13:54"
           updated: "2018-08-07 14:58:10"
           tenancy_id: 1
           enable: 1
           support: "a:1:{i:0;s:21:\"FTTHBundle\\Entity\\ONU\";}"
           owner: 1
-          used_by_default: 0

+ 3 - 10
app/Resources/workflows/workflow_list.yml.dist

@@ -49,19 +49,12 @@ framework:
           - currentState
       supports:
         - FTTHBundle\Entity\ONU
-      initial_place: created
+      initial_place: active
       places:
-        - created
-        - deleted
         - active
         - disable
+        - deleted
       transitions:
-        created_active:
-          from: created
-          to: active
-        created_deleted:
-          from: created
-          to: deleted
         active:
           from: disable
           to: active
@@ -76,4 +69,4 @@ framework:
           to: disable
         active_deleted:
           from: active
-          to: deleted
+          to: deleted

+ 5 - 2
composer.json

@@ -198,6 +198,7 @@
         "doctrine-migrations": "php bin/console doctrine:migrations:migrate --no-interaction -vvv",
         "doctrine-update": "php bin/console doctrine:schema:update --force",
         "auto-increment": "php bin/console baseadmin:autoincrement",
+        "workflow-default": "php bin/console workflow:default --class=FTTHBundle\\\\Entity\\\\ONU --all",
         "post-install-cmd": [
             "@workflows-commands",
             "@symfony-scripts",
@@ -207,14 +208,16 @@
             "@doctrine-update",
             "@auto-increment",
             "@doctrine-migrations-down",
-            "@doctrine-migrations"
+            "@doctrine-migrations",
+            "@workflow-default"
         ],
         "post-update-cmd": [
             "@workflows-commands",
             "@symfony-scripts",
             "@mkdir-dir-cache-sessions-logs",
             "@chmod-dir-cache-sessions-logs",
-            "@auto-increment"
+            "@auto-increment",
+            "@workflow-default"
         ]
     },
     "extra": {