Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
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); }
So each call to syncSchema() would result in processing all changes on the schema instance (dropTable(), etc.) to actual SQL commands and placed on the "operations" stack? And at that point the schema instance should show no diffs so that any future calls to syncSchema() would only include schema changes since the previous call?