fix: add constraint actions to db structure
This commit adds several missing "cascade delete" actions to relationships on database tables. This effectively fixes errors while trying to delete user accounts because of pending child records. Additionally, the observers for applications and vacancies were removed, since they are now obsolete. The account deletion system was also refactored.
This commit is contained in:
@@ -38,6 +38,7 @@ use Sentry;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
@@ -62,11 +63,6 @@ class AppServiceProvider extends ServiceProvider
|
||||
Schema::defaultStringLength(191);
|
||||
Paginator::useBootstrap();
|
||||
|
||||
// Register observers
|
||||
User::observe(UserObserver::class);
|
||||
Application::observe(ApplicationObserver::class);
|
||||
Vacancy::observe(VacancyObserver::class);
|
||||
|
||||
$https = ($this->app->environment() != 'local');
|
||||
$collect = true;
|
||||
|
||||
@@ -78,6 +74,10 @@ class AppServiceProvider extends ServiceProvider
|
||||
$collect = false;
|
||||
}
|
||||
|
||||
// Initialize user observer
|
||||
User::observe(UserObserver::class);
|
||||
|
||||
|
||||
$this->app['request']->server->set('HTTPS', $https);
|
||||
|
||||
View::share('shouldCollect', $collect);
|
||||
|
Reference in New Issue
Block a user