From 4cda88ec5e88b0883e68ec1e66286ee183258306 Mon Sep 17 00:00:00 2001 From: Zaven Arra Date: Thu, 10 Mar 2022 15:30:33 -0800 Subject: [PATCH] fix: remove legacy columns from db table and seed --- .../sqls/20220308233826-stakeholder-up.sql | 11 +-- database/seeds/01_table_stakeholder.js | 86 ++----------------- database/seeds/10_fairtree_story.js | 11 +-- docs/api/spec/example-messaging.yaml | 1 - 4 files changed, 9 insertions(+), 100 deletions(-) diff --git a/database/migrations/sqls/20220308233826-stakeholder-up.sql b/database/migrations/sqls/20220308233826-stakeholder-up.sql index 44e4b4b..cf2ae0f 100644 --- a/database/migrations/sqls/20220308233826-stakeholder-up.sql +++ b/database/migrations/sqls/20220308233826-stakeholder-up.sql @@ -8,18 +8,9 @@ CREATE TABLE stakeholder ( last_name varchar, email varchar NOT NULL, phone varchar NOT NULL, - password varchar, - wallet varchar, - salt varchar, website varchar, logo_url varchar, map varchar, - pwd_reset_required boolean, - offering_pay_to_plant boolean, - organization_id integer, - active_contract_id uuid, - tree_validation_contract_id uuid, - owner_id uuid, created_at timestamptz NOT NULL DEFAULT now(), updated_at timestamptz NOT NULL DEFAULT now() -); \ No newline at end of file +); diff --git a/database/seeds/01_table_stakeholder.js b/database/seeds/01_table_stakeholder.js index 3260b94..5eca909 100644 --- a/database/seeds/01_table_stakeholder.js +++ b/database/seeds/01_table_stakeholder.js @@ -13,18 +13,9 @@ exports.seed = function (knex) { last_name: '', email: 'hello@greenstand.com', phone: '123-123-2122', - pwd_reset_required: null, - password: null, - wallet: null, - salt: null, - offering_pay_to_plant: null, - active_contract_id: null, - tree_validation_contract_id: null, website: 'greenstand', logo_url: './logo_192x192.png', - map: '/greenstandMap', - organization_id: 1, - owner_id: null, + map: 'greenstandMap', }, { id: 'a8567323-88b1-4870-8c48-68d2da3ab356', @@ -34,18 +25,9 @@ exports.seed = function (knex) { last_name: '', email: 'hello@greenstance.com', phone: '123-123-1234', - pwd_reset_required: null, - password: null, - wallet: null, - salt: null, - offering_pay_to_plant: null, - active_contract_id: null, - tree_validation_contract_id: null, website: 'greenstance.com', logo_url: './logo_192x192.png', - map: '/greenstance', - organization_id: null, - owner_id: null, + map: 'greenstance', }, { id: 'c92189d2-2d55-44bc-a0b4-0dad25dc9f35', @@ -55,18 +37,9 @@ exports.seed = function (knex) { last_name: '', email: 'greenspace@green.com', phone: '123-123-1324', - pwd_reset_required: null, - password: null, - wallet: null, - salt: null, - offering_pay_to_plant: null, - active_contract_id: null, - tree_validation_contract_id: null, website: 'greenspace.com', logo_url: './logo_192x192.png', - map: '/greenspace', - organization_id: null, - owner_id: null, + map: 'greenspace', }, { id: '344a6130-9094-4a05-8fd6-faf176593fbc', @@ -76,18 +49,9 @@ exports.seed = function (knex) { last_name: '', email: 'hi@greenworld.com', phone: '123-123-1234', - pwd_reset_required: null, - password: null, - wallet: null, - salt: null, - offering_pay_to_plant: null, - active_contract_id: null, - tree_validation_contract_id: null, website: 'greenworld.com', logo_url: './logo_192x192.png', - map: '/greenworld', - organization_id: null, - owner_id: null, + map: 'greenworld', }, { id: '1a05ec87-3c38-4395-b9f3-aa15becedc31', @@ -97,18 +61,9 @@ exports.seed = function (knex) { last_name: '', email: 'child@gmail.com', phone: '123-123-1234', - pwd_reset_required: null, - password: null, - wallet: null, - salt: null, - offering_pay_to_plant: null, - active_contract_id: null, - tree_validation_contract_id: null, website: 'childone.com', logo_url: './logo_192x192.png', - map: '/childOne', - organization_id: null, - owner_id: null, + map: 'childOne', }, { id: '1d2fb06e-e8f7-40de-8e13-ed3eba1abb3a', @@ -118,18 +73,9 @@ exports.seed = function (knex) { last_name: '', email: 'childtwo@gmail.com', phone: '123-234-1234', - pwd_reset_required: null, - password: null, - wallet: null, - salt: null, - offering_pay_to_plant: null, - active_contract_id: null, - tree_validation_contract_id: null, website: 'childtwo.com', logo_url: './logo_192x192.png', - map: '/childTwo', - organization_id: null, - owner_id: null, + map: 'childTwo', }, { id: '35a23de8-f1ab-4409-be79-3c6a158d5bde', @@ -139,18 +85,9 @@ exports.seed = function (knex) { last_name: 'One', email: 'growerOne@gmail.com', phone: '123-123-1234', - pwd_reset_required: null, - password: null, - wallet: null, - salt: null, - offering_pay_to_plant: null, - active_contract_id: null, - tree_validation_contract_id: null, website: '', logo_url: './person_192x192.png', - map: '/childtwo', - organization_id: null, - owner_id: null, + map: 'childtwo', }, { id: '90eef52b-ad55-4953-ace9-6a324ae6cec2', @@ -160,18 +97,9 @@ exports.seed = function (knex) { last_name: 'Two', email: 'growerTwo@gmail.com', phone: '123-123-1235', - pwd_reset_required: null, - password: null, - wallet: null, - salt: null, - offering_pay_to_plant: null, - active_contract_id: null, - tree_validation_contract_id: null, website: '', logo_url: './person_192x192.png', map: '', - organization_id: null, - owner_id: null, }, ]); }); diff --git a/database/seeds/10_fairtree_story.js b/database/seeds/10_fairtree_story.js index 6d45cdf..e8bf175 100644 --- a/database/seeds/10_fairtree_story.js +++ b/database/seeds/10_fairtree_story.js @@ -14,18 +14,9 @@ exports.seed = async function (knex) { last_name: '', email: 'hello@greenstand.com', phone: '123-123-2122', - pwd_reset_required: null, - password: null, - wallet: null, - salt: null, - offering_pay_to_plant: null, - active_contract_id: null, - tree_validation_contract_id: null, website: 'greenstand', logo_url: './logo_192x192.png', - map: '/greenstandMap', - organization_id: 1, - owner_id: null, + map: 'greenstandMap', } organization.id = parentId; diff --git a/docs/api/spec/example-messaging.yaml b/docs/api/spec/example-messaging.yaml index cdaff4e..8dc2e70 100644 --- a/docs/api/spec/example-messaging.yaml +++ b/docs/api/spec/example-messaging.yaml @@ -254,7 +254,6 @@ paths: parent_message_id: 0 recipient_handle: '+13132324232' author_handle: string - subject: string body: string org-wide-message-with-survey: value: