Skip to content

Commit

Permalink
feat: add ciip_sector column to naics_code table
Browse files Browse the repository at this point in the history
  • Loading branch information
dleard committed Mar 22, 2021
1 parent 2fe82eb commit 0d42c8e
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 0 deletions.
23 changes: 23 additions & 0 deletions app/server/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -31557,6 +31557,11 @@ American Industry Classification System and is used to categorize industrial
operations into sectors.
"""
type NaicsCode implements Node {
"""
The sector this naics code belongs to according to the CleanBC Industrial Incentive Program
"""
ciipSector: String

"""Reads a single `CiipUser` that is related to this `NaicsCode`."""
ciipUserByCreatedBy: CiipUser

Expand Down Expand Up @@ -31963,6 +31968,9 @@ A condition to be used against `NaicsCode` object types. All fields are tested
for equality and combined with a logical ‘and.’
"""
input NaicsCodeCondition {
"""Checks for equality with the object’s `ciipSector` field."""
ciipSector: String

"""Checks for equality with the object’s `createdAt` field."""
createdAt: Datetime

Expand Down Expand Up @@ -31998,6 +32006,9 @@ input NaicsCodeFilter {
"""Checks for all expressions in this list."""
and: [NaicsCodeFilter!]

"""Filter by the object’s `ciipSector` field."""
ciipSector: StringFilter

"""Filter by the object’s `createdAt` field."""
createdAt: DatetimeFilter

Expand Down Expand Up @@ -32096,6 +32107,11 @@ type NaicsCodeFuelsByFuelNaicsCodeNaicsCodeIdAndFuelIdManyToManyEdge {

"""An input for mutations affecting `NaicsCode`"""
input NaicsCodeInput {
"""
The sector this naics code belongs to according to the CleanBC Industrial Incentive Program
"""
ciipSector: String

"""The timestamp of when this naics_code row was created"""
createdAt: Datetime

Expand Down Expand Up @@ -32128,6 +32144,11 @@ input NaicsCodeInput {
Represents an update to a `NaicsCode`. Fields that are set will be updated.
"""
input NaicsCodePatch {
"""
The sector this naics code belongs to according to the CleanBC Industrial Incentive Program
"""
ciipSector: String

"""The timestamp of when this naics_code row was created"""
createdAt: Datetime

Expand Down Expand Up @@ -32184,6 +32205,8 @@ type NaicsCodesEdge {

"""Methods to use when ordering `NaicsCode`."""
enum NaicsCodesOrderBy {
CIIP_SECTOR_ASC
CIIP_SECTOR_DESC
CREATED_AT_ASC
CREATED_AT_DESC
CREATED_BY_ASC
Expand Down
64 changes: 64 additions & 0 deletions app/server/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -86118,6 +86118,18 @@
"name": "NaicsCode",
"description": "Table contains naics codes & their descriptions. NAICS is an acronym for North American Industry Classification System and is used to categorize industrial operations into sectors.",
"fields": [
{
"name": "ciipSector",
"description": "The sector this naics code belongs to according to the CleanBC Industrial Incentive Program",
"args": [],
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "ciipUserByCreatedBy",
"description": "Reads a single `CiipUser` that is related to this `NaicsCode`.",
Expand Down Expand Up @@ -88203,6 +88215,16 @@
"description": "A condition to be used against `NaicsCode` object types. All fields are tested for equality and combined with a logical ‘and.’",
"fields": null,
"inputFields": [
{
"name": "ciipSector",
"description": "Checks for equality with the object’s `ciipSector` field.",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
},
{
"name": "createdAt",
"description": "Checks for equality with the object’s `createdAt` field.",
Expand Down Expand Up @@ -88322,6 +88344,16 @@
},
"defaultValue": null
},
{
"name": "ciipSector",
"description": "Filter by the object’s `ciipSector` field.",
"type": {
"kind": "INPUT_OBJECT",
"name": "StringFilter",
"ofType": null
},
"defaultValue": null
},
{
"name": "createdAt",
"description": "Filter by the object’s `createdAt` field.",
Expand Down Expand Up @@ -88453,6 +88485,18 @@
"inputFields": null,
"interfaces": null,
"enumValues": [
{
"name": "CIIP_SECTOR_ASC",
"description": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "CIIP_SECTOR_DESC",
"description": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "CREATED_AT_ASC",
"description": null,
Expand Down Expand Up @@ -124659,6 +124703,16 @@
"description": "An input for mutations affecting `NaicsCode`",
"fields": null,
"inputFields": [
{
"name": "ciipSector",
"description": "The sector this naics code belongs to according to the CleanBC Industrial Incentive Program",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
},
{
"name": "createdAt",
"description": "The timestamp of when this naics_code row was created",
Expand Down Expand Up @@ -137581,6 +137635,16 @@
"description": "Represents an update to a `NaicsCode`. Fields that are set will be updated.",
"fields": null,
"inputFields": [
{
"name": "ciipSector",
"description": "The sector this naics code belongs to according to the CleanBC Industrial Incentive Program",
"type": {
"kind": "SCALAR",
"name": "String",
"ofType": null
},
"defaultValue": null
},
{
"name": "createdAt",
"description": "The timestamp of when this naics_code row was created",
Expand Down
2 changes: 2 additions & 0 deletions schema/deploy/tables/naics_code.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ begin;
create table ggircs_portal.naics_code (
id integer primary key generated always as identity,
naics_code varchar(1000) not null,
ciip_sector varchar(1000),
naics_description varchar(10000) not null
);

Expand Down Expand Up @@ -38,6 +39,7 @@ $grant$;
comment on table ggircs_portal.naics_code is 'Table contains naics codes & their descriptions. NAICS is an acronym for North American Industry Classification System and is used to categorize industrial operations into sectors.';
comment on column ggircs_portal.naics_code.id is 'Primary key for naics_code table';
comment on column ggircs_portal.naics_code.naics_code is 'The naics_code, NAICS is an acronym for North American Industry Classification System and is used to categorize industrial operations into sectors.';
comment on column ggircs_portal.naics_code.ciip_sector is 'The sector this naics code belongs to according to the CleanBC Industrial Incentive Program';
comment on column ggircs_portal.naics_code.naics_description is 'The plain text description of the NAICS classification';
comment on column ggircs_portal.naics_code.created_at is 'The timestamp of when this naics_code row was created';
comment on column ggircs_portal.naics_code.created_by is 'The id of the user who created this row, references ciip_user(id)';
Expand Down

0 comments on commit 0d42c8e

Please sign in to comment.