Add district table for california districts.

This commit is contained in:
Eli Ribble 2026-01-13 19:47:19 +00:00
parent e6e8371742
commit 00fd676adc
No known key found for this signature in database
24 changed files with 4384 additions and 125 deletions

320
db/dbinfo/district.bob.go Normal file
View file

@ -0,0 +1,320 @@
// Code generated by BobGen psql v0.0.4-0.20260105020634-53e08d840e47+dirty. DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package dbinfo
import "github.com/aarondl/opt/null"
var Districts = Table[
districtColumns,
districtIndexes,
districtForeignKeys,
districtUniques,
districtChecks,
]{
Schema: "",
Name: "district",
Columns: districtColumns{
Gid: column{
Name: "gid",
DBType: "integer",
Default: "nextval('district_gid_seq'::regclass)",
Comment: "",
Nullable: false,
Generated: false,
AutoIncr: false,
},
ID: column{
Name: "id",
DBType: "numeric",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Website: column{
Name: "website",
DBType: "character varying",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Contact: column{
Name: "contact",
DBType: "character varying",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Address: column{
Name: "address",
DBType: "character varying",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Regionid: column{
Name: "regionid",
DBType: "numeric",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
PostalCod: column{
Name: "postal_cod",
DBType: "numeric",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Phone1: column{
Name: "phone1",
DBType: "character varying",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Fax1: column{
Name: "fax1",
DBType: "character varying",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Agency: column{
Name: "agency",
DBType: "character varying",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Code1: column{
Name: "code1",
DBType: "character varying",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
City1: column{
Name: "city1",
DBType: "character varying",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
ShapeLeng: column{
Name: "shape_leng",
DBType: "numeric",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Address2: column{
Name: "address2",
DBType: "character varying",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
GeneralMG: column{
Name: "general_mg",
DBType: "character varying",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
City2: column{
Name: "city2",
DBType: "character varying",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
PostalC1: column{
Name: "postal_c_1",
DBType: "numeric",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Fax2: column{
Name: "fax2",
DBType: "character varying",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Phone2: column{
Name: "phone2",
DBType: "character varying",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
ShapeLe1: column{
Name: "shape_le_1",
DBType: "numeric",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
ShapeArea: column{
Name: "shape_area",
DBType: "numeric",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
Geom: column{
Name: "geom",
DBType: "geometry",
Default: "NULL",
Comment: "",
Nullable: true,
Generated: false,
AutoIncr: false,
},
},
Indexes: districtIndexes{
DistrictPkey: index{
Type: "btree",
Name: "district_pkey",
Columns: []indexColumn{
{
Name: "gid",
Desc: null.FromCond(false, true),
IsExpression: false,
},
},
Unique: true,
Comment: "",
NullsFirst: []bool{false},
NullsDistinct: false,
Where: "",
Include: []string{},
},
DistrictGeomIdx: index{
Type: "gist",
Name: "district_geom_idx",
Columns: []indexColumn{
{
Name: "geom",
Desc: null.FromCond(false, true),
IsExpression: false,
},
},
Unique: false,
Comment: "",
NullsFirst: []bool{false},
NullsDistinct: false,
Where: "",
Include: []string{},
},
},
PrimaryKey: &constraint{
Name: "district_pkey",
Columns: []string{"gid"},
Comment: "",
},
Comment: "",
}
type districtColumns struct {
Gid column
ID column
Website column
Contact column
Address column
Regionid column
PostalCod column
Phone1 column
Fax1 column
Agency column
Code1 column
City1 column
ShapeLeng column
Address2 column
GeneralMG column
City2 column
PostalC1 column
Fax2 column
Phone2 column
ShapeLe1 column
ShapeArea column
Geom column
}
func (c districtColumns) AsSlice() []column {
return []column{
c.Gid, c.ID, c.Website, c.Contact, c.Address, c.Regionid, c.PostalCod, c.Phone1, c.Fax1, c.Agency, c.Code1, c.City1, c.ShapeLeng, c.Address2, c.GeneralMG, c.City2, c.PostalC1, c.Fax2, c.Phone2, c.ShapeLe1, c.ShapeArea, c.Geom,
}
}
type districtIndexes struct {
DistrictPkey index
DistrictGeomIdx index
}
func (i districtIndexes) AsSlice() []index {
return []index{
i.DistrictPkey, i.DistrictGeomIdx,
}
}
type districtForeignKeys struct{}
func (f districtForeignKeys) AsSlice() []foreignKey {
return []foreignKey{}
}
type districtUniques struct{}
func (u districtUniques) AsSlice() []constraint {
return []constraint{}
}
type districtChecks struct{}
func (c districtChecks) AsSlice() []check {
return []check{}
}