Remove unused description column from common_third_parties
The description field was never surfaced in the UI and added no value. Drop it from the database, Go structs, GraphQL schema, import tool, frontend fragment, and vendor seed data. Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -30,7 +30,6 @@ type (
|
||||
CommonThirdParty struct {
|
||||
ID gid.GID `db:"id"`
|
||||
Name string `db:"name"`
|
||||
Description *string `db:"description"`
|
||||
Category VendorCategory `db:"category"`
|
||||
HeadquarterAddress *string `db:"headquarter_address"`
|
||||
LegalName *string `db:"legal_name"`
|
||||
@@ -63,7 +62,6 @@ func (t *CommonThirdParty) LoadByID(
|
||||
SELECT
|
||||
id,
|
||||
name,
|
||||
description,
|
||||
category,
|
||||
headquarter_address,
|
||||
legal_name,
|
||||
@@ -119,7 +117,6 @@ func (t *CommonThirdParty) LoadByName(
|
||||
SELECT
|
||||
id,
|
||||
name,
|
||||
description,
|
||||
category,
|
||||
headquarter_address,
|
||||
legal_name,
|
||||
@@ -174,7 +171,6 @@ func (t CommonThirdParty) Insert(
|
||||
INSERT INTO common_third_parties (
|
||||
id,
|
||||
name,
|
||||
description,
|
||||
category,
|
||||
headquarter_address,
|
||||
legal_name,
|
||||
@@ -196,7 +192,6 @@ INSERT INTO common_third_parties (
|
||||
) VALUES (
|
||||
@id,
|
||||
@name,
|
||||
@description,
|
||||
@category,
|
||||
@headquarter_address,
|
||||
@legal_name,
|
||||
@@ -221,7 +216,6 @@ INSERT INTO common_third_parties (
|
||||
args := pgx.StrictNamedArgs{
|
||||
"id": t.ID,
|
||||
"name": t.Name,
|
||||
"description": t.Description,
|
||||
"category": t.Category,
|
||||
"headquarter_address": t.HeadquarterAddress,
|
||||
"legal_name": t.LegalName,
|
||||
@@ -261,7 +255,6 @@ func (t CommonThirdParty) Upsert(
|
||||
INSERT INTO common_third_parties (
|
||||
id,
|
||||
name,
|
||||
description,
|
||||
category,
|
||||
headquarter_address,
|
||||
legal_name,
|
||||
@@ -283,7 +276,6 @@ INSERT INTO common_third_parties (
|
||||
) VALUES (
|
||||
@id,
|
||||
@name,
|
||||
@description,
|
||||
@category,
|
||||
@headquarter_address,
|
||||
@legal_name,
|
||||
@@ -306,7 +298,6 @@ INSERT INTO common_third_parties (
|
||||
ON CONFLICT (lower(name)) DO UPDATE
|
||||
SET
|
||||
name = EXCLUDED.name,
|
||||
description = EXCLUDED.description,
|
||||
category = EXCLUDED.category,
|
||||
headquarter_address = EXCLUDED.headquarter_address,
|
||||
legal_name = EXCLUDED.legal_name,
|
||||
@@ -329,7 +320,6 @@ RETURNING (xmax = 0) AS inserted
|
||||
args := pgx.StrictNamedArgs{
|
||||
"id": t.ID,
|
||||
"name": t.Name,
|
||||
"description": t.Description,
|
||||
"category": t.Category,
|
||||
"headquarter_address": t.HeadquarterAddress,
|
||||
"legal_name": t.LegalName,
|
||||
@@ -394,7 +384,6 @@ func (t *CommonThirdParties) LoadAll(
|
||||
SELECT
|
||||
id,
|
||||
name,
|
||||
description,
|
||||
category,
|
||||
headquarter_address,
|
||||
legal_name,
|
||||
|
||||
15
pkg/coredata/migrations/20260511T122400Z.sql
Normal file
15
pkg/coredata/migrations/20260511T122400Z.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
-- Copyright (c) 2026 Probo Inc <hello@getprobo.com>.
|
||||
--
|
||||
-- Permission to use, copy, modify, and/or distribute this software for any
|
||||
-- purpose with or without fee is hereby granted, provided that the above
|
||||
-- copyright notice and this permission notice appear in all copies.
|
||||
--
|
||||
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
-- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
-- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
-- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
-- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
-- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
-- PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
ALTER TABLE common_third_parties DROP COLUMN description;
|
||||
@@ -18,7 +18,6 @@ type CommonThirdParty
|
||||
) {
|
||||
id: ID!
|
||||
name: String!
|
||||
description: String
|
||||
category: VendorCategory!
|
||||
websiteUrl: String
|
||||
headquarterAddress: String
|
||||
|
||||
@@ -22,7 +22,6 @@ import (
|
||||
type CommonThirdParty struct {
|
||||
ID gid.GID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
Category coredata.VendorCategory `json:"category"`
|
||||
WebsiteURL *string `json:"websiteUrl,omitempty"`
|
||||
HeadquarterAddress *string `json:"headquarterAddress,omitempty"`
|
||||
@@ -42,7 +41,6 @@ func NewCommonThirdParty(c *coredata.CommonThirdParty) *CommonThirdParty {
|
||||
return &CommonThirdParty{
|
||||
ID: c.ID,
|
||||
Name: c.Name,
|
||||
Description: c.Description,
|
||||
Category: c.Category,
|
||||
WebsiteURL: c.WebsiteURL,
|
||||
HeadquarterAddress: c.HeadquarterAddress,
|
||||
|
||||
Reference in New Issue
Block a user