From 744b176c7e3fa503a9639061974866f87cd348b2 Mon Sep 17 00:00:00 2001 From: Fabiano Santos Florentino Date: Sun, 31 Mar 2024 19:16:54 -0300 Subject: [PATCH] Add pgcrypto extension and insert supervisor user into customers table --- db/migrate/20240331143457_add_supervisor_user_to_customers.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/migrate/20240331143457_add_supervisor_user_to_customers.rb b/db/migrate/20240331143457_add_supervisor_user_to_customers.rb index c765420..3029505 100644 --- a/db/migrate/20240331143457_add_supervisor_user_to_customers.rb +++ b/db/migrate/20240331143457_add_supervisor_user_to_customers.rb @@ -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', 'supervisor@local.com', crypt('#{SUPERVISOR_PASSWORD}', gen_salt('bf')), 'admin', now(), now()) SQL