Skip to content

Instantly share code, notes, and snippets.

@mneuhaus
Created December 5, 2012 09:21
Show Gist options
  • Save mneuhaus/4214191 to your computer and use it in GitHub Desktop.
Save mneuhaus/4214191 to your computer and use it in GitHub Desktop.
$this->addSql("CREATE TABLE foo_bar_domain_model_branch (persistence_object_identifier VARCHAR(40) NOT NULL, parent_branch_id VARCHAR(40) DEFAULT NULL, name VARCHAR(255) NOT NULL, INDEX IDX_2CF8D4F52D9DE3A7 (parent_branch_id), PRIMARY KEY(persistence_object_identifier)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB");
$this->addSql("ALTER TABLE foo_bar_domain_model_branch ADD CONSTRAINT FK_2CF8D4F52D9DE3A7 FOREIGN KEY (parent_branch_id) REFERENCES foo_bar_domain_model_branch (persistence_object_identifier)");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment