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
feat: limit User model to a single membership #135
Conversation
Codecov Report
@@ Coverage Diff @@
## main #135 +/- ##
============================================
+ Coverage 54.09% 62.36% +8.27%
- Complexity 73 82 +9
============================================
Files 21 25 +4
Lines 342 372 +30
============================================
+ Hits 185 232 +47
+ Misses 157 140 -17
Continue to review full report at Codecov.
|
# Conflicts: # src/Commands/HearthCommand.php # stubs/app/Models/User.php
protected function getEnvironmentSetUp($app) | ||
{ | ||
Schema::dropAllTables(); | ||
|
||
$create_users_table = include __DIR__ . '/../../database/migrations/create_users_table.php.stub'; | ||
$update_users_table = include __DIR__ . '/../../database/migrations/update_users_table.php.stub'; | ||
$create_memberships_table = include __DIR__ . '/../../database/migrations/2021_03_01_000000_create_memberships_table.php'; | ||
$create_organizations_table = include __DIR__ . '/../../database/migrations/create_organizations_table.php.stub'; | ||
|
||
$create_users_table->up(); | ||
$update_users_table->up(); | ||
$create_memberships_table->up(); | ||
$create_organizations_table->up(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this will work for you, but I used the DatabaseMigrations
trait to run the migrations with the tests.
@greatislander I'm getting errors when running
Not sure if there's something I'm missing and causing this error. For the database requirement, it's probably best to update the README to explain what's needed. |
I missed running |
Co-authored-by: greatislander <greatislander@users.noreply.github.com>
This PR makes a few changes: