Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split the two discussion_id -> post_id migrations into 4 total #80

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dsevillamartin
Copy link
Member

Changes proposed in this pull request:
Split v2 migrations further to allow for easier debugging of failures & retries.

Seems to work with non prefix & prefix installations.

Confirmed

  • Backend changes: tests are green (run composer test).

Comment on lines 64 to 67

$schema->table('polls', function (Blueprint $table) {
$table->foreign('post_id')->references('id')->on('posts')->onDelete('cascade');
});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of moving this to later, why not move the stuff above it to an earlier migration. This way you won't need to do that weird DB resolving and identifying whether the constraint was already created 🙈

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Only downside I see is the naming of these migrations, but they're still in order. Let me know how it looks now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants