Skip to content

Commit

Permalink
Empty db before reseed
Browse files Browse the repository at this point in the history
  • Loading branch information
perryzjc committed Feb 26, 2024
1 parent 4862e0b commit 4efc0e9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions db/seed_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ module SeedData
DENY_EMAIL3

def self.emails
# Delete existing EmailTemplates before creating new ones
EmailTemplate.delete_all if EmailTemplate.exists?
[
{
body: @welcome_email,
Expand Down Expand Up @@ -118,6 +120,9 @@ def self.create_schools
end

def self.teachers
# Delete existing teachers before creating new ones
Teacher.delete_all if Teacher.exists?

[
{
first_name: "Michael",
Expand Down

0 comments on commit 4efc0e9

Please sign in to comment.