From c2bf6841e1f08c5c52eba79c5a52a7b2dffa1be4 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Tue, 14 Feb 2023 15:05:09 -0800 Subject: [PATCH] Documentation updates. --- README.MD | 13 +------------ .../1676337846761_run_sql_migration/down.sql | 11 +++++++++++ .../1676337846761_run_sql_migration/up.sql | 9 +++++++++ server/email/sendemail.js | 2 +- 4 files changed, 22 insertions(+), 13 deletions(-) create mode 100644 hasura/migrations/1676337846761_run_sql_migration/down.sql create mode 100644 hasura/migrations/1676337846761_run_sql_migration/up.sql diff --git a/README.MD b/README.MD index 6dc22d38b..27be64f0a 100644 --- a/README.MD +++ b/README.MD @@ -1,14 +1,3 @@ -Yarn Dependency Management: -To force upgrades for some packages: -yarn upgrade-interactive --latest - -To Start Hasura CLI: -npx hasura console - -Migrating to Staging: -npx hasura migrate apply --endpoint https://db.imex.online/ --admin-secret 'Production-ImEXOnline!@#' -npx hasura migrate apply --endpoint https://db.test.bodyshop.app/ --admin-secret 'Test-ImEXOnlineBySnaptSoftware!' - NGROK TEsting: ./ngrok.exe http http://localhost:4000 -host-header="localhost:4000" @@ -21,4 +10,4 @@ hasura migrate apply --version "1620771761757" --skip-execution --endpoint https hasura migrate status --endpoint https://db.imex.online/ --admin-secret 'Production-ImEXOnline!@#' Generate the license file: -$ generate-license-file --input package.json --output third-party-licenses.txt --overwrite +$ generate-license-file --input package.json --output third-party-licenses.txt --overwrite \ No newline at end of file diff --git a/hasura/migrations/1676337846761_run_sql_migration/down.sql b/hasura/migrations/1676337846761_run_sql_migration/down.sql new file mode 100644 index 000000000..dfab8b8c8 --- /dev/null +++ b/hasura/migrations/1676337846761_run_sql_migration/down.sql @@ -0,0 +1,11 @@ +-- Could not auto-generate a down migration. +-- Please write an appropriate down migration for the SQL below: +-- CREATE INDEX idx_phonebook_firstname ON public.phonebook USING gin (firstname public.gin_trgm_ops); +-- CREATE INDEX idx_phonebook_lastname ON public.phonebook USING gin (lastname public.gin_trgm_ops); +-- CREATE INDEX idx_phonebook_company ON public.phonebook USING gin (company public.gin_trgm_ops); +-- CREATE INDEX idx_phonebook_address1 ON public.phonebook USING gin (address1 public.gin_trgm_ops); +-- CREATE INDEX idx_phonebook_phone1 ON public.phonebook USING gin (phone1 public.gin_trgm_ops); +-- CREATE INDEX idx_phonebook_phone2 ON public.phonebook USING gin (phone2 public.gin_trgm_ops); +-- CREATE INDEX idx_phonebook_email ON public.phonebook USING gin (email public.gin_trgm_ops); +-- CREATE INDEX idx_phonebook_category ON public.phonebook USING gin (category public.gin_trgm_ops); +-- CREATE INDEX idx_vendor_name ON public.vendors USING gin (name public.gin_trgm_ops); diff --git a/hasura/migrations/1676337846761_run_sql_migration/up.sql b/hasura/migrations/1676337846761_run_sql_migration/up.sql new file mode 100644 index 000000000..c469df083 --- /dev/null +++ b/hasura/migrations/1676337846761_run_sql_migration/up.sql @@ -0,0 +1,9 @@ +CREATE INDEX idx_phonebook_firstname ON public.phonebook USING gin (firstname public.gin_trgm_ops); +CREATE INDEX idx_phonebook_lastname ON public.phonebook USING gin (lastname public.gin_trgm_ops); +CREATE INDEX idx_phonebook_company ON public.phonebook USING gin (company public.gin_trgm_ops); +CREATE INDEX idx_phonebook_address1 ON public.phonebook USING gin (address1 public.gin_trgm_ops); +CREATE INDEX idx_phonebook_phone1 ON public.phonebook USING gin (phone1 public.gin_trgm_ops); +CREATE INDEX idx_phonebook_phone2 ON public.phonebook USING gin (phone2 public.gin_trgm_ops); +CREATE INDEX idx_phonebook_email ON public.phonebook USING gin (email public.gin_trgm_ops); +CREATE INDEX idx_phonebook_category ON public.phonebook USING gin (category public.gin_trgm_ops); +CREATE INDEX idx_vendor_name ON public.vendors USING gin (name public.gin_trgm_ops); diff --git a/server/email/sendemail.js b/server/email/sendemail.js index 28c0adf5d..046ca16ee 100644 --- a/server/email/sendemail.js +++ b/server/email/sendemail.js @@ -28,7 +28,7 @@ exports.sendServerEmail = async function ({ subject, text }) { transporter.sendMail( { from: `ImEX Online API - ${process.env.NODE_ENV} `, - to: ["patrick@snapt.ca"], + to: ["patrick@imexsystems.ca"], subject: subject, text: text, ses: {