Doctrine Migrations
  1. Doctrine Migrations
  2. DMIG-26

Remove implicit schema diff to sql in Migration tasks for explicit solution

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Labels:
      None

      Description

      Currently the following leads to an implicit drop table statement:

      public function up(Schema $schema)
       {
          $schema->dropTable("foo");
      }
      

      However this should be an explicit operation that internally puts everything onto the "addSQL" stack, then resets the schema diffs to zero by cloning the current schema into the "diff schema" again.

      public function up(Schema $schema)
       {
          $schema->dropTable("foo");
          $this->syncSchema($schema);
          $schema->dropTable("bar");
          $this->syncSchema($schema);
      }
      

        Activity

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Benjamin Eberlei
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: