Skip to content

Commit

Permalink
Merge pull request #35 from fabianoflorentino/development
Browse files Browse the repository at this point in the history
Add pgcrypto extension and insert supervisor user into customers table
  • Loading branch information
fabianoflorentino authored Mar 31, 2024
2 parents 9d9a3c3 + 3b446b3 commit a1094db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ jobs:

- name: Database Setup
run: |
psql "postgresql://${{ secrets.POSTGRES_USER }}:${{ secrets.POSTGRES_PASSWORD }}@localhost:5432" << EOF
CREATE EXTENSION IF NOT EXISTS "pgcrypto";
EOF
bundle exec rails db:migrate
- name: Run RSpec
Expand Down
2 changes: 2 additions & 0 deletions db/migrate/20240331143457_add_supervisor_user_to_customers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class AddSupervisorUserToCustomers < ActiveRecord::Migration[7.1]

def up
execute <<-SQL.squish
CREATE EXTENSION IF NOT EXISTS pgcrypto;
INSERT INTO customers (name, email, password, role, created_at, updated_at)
VALUES ('Supervisor', '[email protected]', crypt('#{SUPERVISOR_PASSWORD}', gen_salt('bf')), 'admin', now(), now())
SQL
Expand Down

0 comments on commit a1094db

Please sign in to comment.