Skip to content

Instantly share code, notes, and snippets.

@scc-agnitio
Created October 4, 2019 08:50
Show Gist options
  • Select an option

  • Save scc-agnitio/5adfa2c460efff5104b93568831ed572 to your computer and use it in GitHub Desktop.

Select an option

Save scc-agnitio/5adfa2c460efff5104b93568831ed572 to your computer and use it in GitHub Desktop.
Reset Meetings Tables
protected function resetMeetings(): void
{
\Illuminate\Support\Facades\DB::statement("SET foreign_key_checks = 0");
\Illuminate\Support\Facades\DB::table('meetings')->truncate();
\Illuminate\Support\Facades\DB::table('meeting_participant_tokens')->truncate();
\Illuminate\Support\Facades\DB::table('meeting_versions')->truncate();
\Illuminate\Support\Facades\DB::table('meeting_versions_users')->truncate();
\Illuminate\Support\Facades\DB::table('meeting_versions_accounts')->truncate();
\Illuminate\Support\Facades\DB::table('meeting_versions_contacts')->truncate();
\Illuminate\Support\Facades\DB::table('meeting_versions_content')->truncate();
\Illuminate\Support\Facades\DB::table('meeting_versions_tags')->truncate();
DB::statement("SET foreign_key_checks = 1");
dd('Meeting data reset');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment