-
Notifications
You must be signed in to change notification settings - Fork 47
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
🗃️ migrate trips table to use ID instead of IBNR #2422
Conversation
… a single modification. (╯°□°)╯︵ ┻━┻
"SQLite doesn't support dropping foreign keys (you would need to re-create the table)." (╯°□°)╯︵ ┻━┻ |
f43cb6c
to
306f961
Compare
306f961
to
bf44ec8
Compare
4922288
to
631ad15
Compare
631ad15
to
dfeb90d
Compare
Role::where('name', 'event-moderator')->delete(); | ||
Role::where('name', 'open-beta')->delete(); | ||
Role::where('name', 'closed-beta')->delete(); | ||
// empty now - replaced by PermissionSeeder |
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.
Hm. Not a fan. Why is this needed?
Also:
- This file should be deleted
- Moving this logic from a migration to a seeder should be a separate PR (imho)
|
||
public function down(): void { | ||
Permission::findByName('view event history')->delete(); | ||
// empty now - replaced by PermissionSeeder |
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.
Hm. Not a fan. Why is this needed?
Also:
- This file should be deleted
- Moving this logic from a migration to a seeder should be a separate PR (imho)
$permissionCreate->delete(); | ||
$permissionUpdate->delete(); | ||
$permissionDelete->delete(); | ||
// empty now - replaced by PermissionSeeder |
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.
Hm. Not a fan. Why is this needed?
Also:
- This file should be deleted
- Moving this logic from a migration to a seeder should be a separate PR (imho)
$roleAdmin->revokePermissionTo($permission); | ||
|
||
$permission->delete(); | ||
// empty now - replaced by PermissionSeeder |
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.
Hm. Not a fan. Why is this needed?
Also:
- This file should be deleted
- Moving this logic from a migration to a seeder should be a separate PR (imho)
Role::findByName('closed-beta')->revokePermissionTo($permission); | ||
|
||
$permission->delete(); | ||
// empty now - replaced by PermissionSeeder |
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.
Hm. Not a fan. Why is this needed?
Also:
- This file should be deleted
- Moving this logic from a migration to a seeder should be a separate PR (imho)
database/migrations/2024_03_11_000000_add_origin_and_destination_id_to_trips.php
Show resolved
Hide resolved
database/migrations/2024_03_11_000000_add_origin_and_destination_id_to_trips.php
Show resolved
Hide resolved
@HerrLevin As discussed: I'll split up this PR in multiple small PR's and do separate migrations for create and drop the data for security reasons (data loss). |
@MrKrisKrisu Not necessarily multiple PRs but multiple migrations. :) |
# Conflicts: # database/migrations/2023_11_21_000002_add_default_permissions.php # database/migrations/2023_12_17_000003_add_event_history_permission.php # database/migrations/2024_01_29_000000_add_station_permissions.php # database/migrations/2024_01_30_000000_add_activity_permissions.php # database/migrations/2024_02_01_000000_add_permissions_for_manual_trips_beta.php # database/seeders/Constants/PermissionSeeder.php # database/seeders/DatabaseSeeder.php # tests/TestCase.php # update.sh
# Conflicts: # app/Http/Controllers/API/v1/StationController.php # app/Http/Controllers/HafasController.php # app/Models/Trip.php # database/factories/TripFactory.php # database/schema/sqlite-schema.sql
see #2411