Skip to content

Commit

Permalink
Add Teen Parent eligibility.
Browse files Browse the repository at this point in the history
This creates a data migration that creates the Teen Parent eligibility.
  • Loading branch information
richardxia committed Aug 20, 2024
1 parent 3a9c0af commit 5fdb202
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions db/migrate/20240819053931_add_teen_parent_eligibility.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
class AddTeenParentEligibility < ActiveRecord::Migration[6.1]
def up
exec_query <<-SQL, "create tean parent eligibility", ["Teen Parent"]
INSERT INTO eligibilities (name, created_at, updated_at)
VALUES ($1, now(), now())
ON CONFLICT (name) DO NOTHING;
SQL
end

def down
raise ActiveRecord::IrreversibleMigration
end
end
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2024_08_04_222349) do
ActiveRecord::Schema.define(version: 2024_08_19_053931) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand Down

0 comments on commit 5fdb202

Please sign in to comment.