Drop district_id from subscriptions
This commit is contained in:
parent
b25daf12fa
commit
d93cdbef41
17 changed files with 62 additions and 2533 deletions
|
|
@ -3,8 +3,6 @@
|
|||
|
||||
package dbinfo
|
||||
|
||||
import "github.com/aarondl/opt/null"
|
||||
|
||||
var PublicreportSubscribePhones = Table[
|
||||
publicreportSubscribePhoneColumns,
|
||||
publicreportSubscribePhoneIndexes,
|
||||
|
|
@ -33,15 +31,6 @@ var PublicreportSubscribePhones = Table[
|
|||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
DistrictID: column{
|
||||
Name: "district_id",
|
||||
DBType: "integer",
|
||||
Default: "",
|
||||
Comment: "",
|
||||
Nullable: false,
|
||||
Generated: false,
|
||||
AutoIncr: false,
|
||||
},
|
||||
PhoneE164: column{
|
||||
Name: "phone_e164",
|
||||
DBType: "text",
|
||||
|
|
@ -52,45 +41,8 @@ var PublicreportSubscribePhones = Table[
|
|||
AutoIncr: false,
|
||||
},
|
||||
},
|
||||
Indexes: publicreportSubscribePhoneIndexes{
|
||||
SubscribePhonePkey: index{
|
||||
Type: "btree",
|
||||
Name: "subscribe_phone_pkey",
|
||||
Columns: []indexColumn{
|
||||
{
|
||||
Name: "district_id",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
{
|
||||
Name: "phone_e164",
|
||||
Desc: null.FromCond(false, true),
|
||||
IsExpression: false,
|
||||
},
|
||||
},
|
||||
Unique: true,
|
||||
Comment: "",
|
||||
NullsFirst: []bool{false, false},
|
||||
NullsDistinct: false,
|
||||
Where: "",
|
||||
Include: []string{},
|
||||
},
|
||||
},
|
||||
PrimaryKey: &constraint{
|
||||
Name: "subscribe_phone_pkey",
|
||||
Columns: []string{"district_id", "phone_e164"},
|
||||
Comment: "",
|
||||
},
|
||||
|
||||
ForeignKeys: publicreportSubscribePhoneForeignKeys{
|
||||
PublicreportSubscribePhoneSubscribePhoneDistrictIDFkey: foreignKey{
|
||||
constraint: constraint{
|
||||
Name: "publicreport.subscribe_phone.subscribe_phone_district_id_fkey",
|
||||
Columns: []string{"district_id"},
|
||||
Comment: "",
|
||||
},
|
||||
ForeignTable: "organization",
|
||||
ForeignColumns: []string{"id"},
|
||||
},
|
||||
PublicreportSubscribePhoneSubscribePhonePhoneE164Fkey: foreignKey{
|
||||
constraint: constraint{
|
||||
Name: "publicreport.subscribe_phone.subscribe_phone_phone_e164_fkey",
|
||||
|
|
@ -106,36 +58,30 @@ var PublicreportSubscribePhones = Table[
|
|||
}
|
||||
|
||||
type publicreportSubscribePhoneColumns struct {
|
||||
Created column
|
||||
Deleted column
|
||||
DistrictID column
|
||||
PhoneE164 column
|
||||
Created column
|
||||
Deleted column
|
||||
PhoneE164 column
|
||||
}
|
||||
|
||||
func (c publicreportSubscribePhoneColumns) AsSlice() []column {
|
||||
return []column{
|
||||
c.Created, c.Deleted, c.DistrictID, c.PhoneE164,
|
||||
c.Created, c.Deleted, c.PhoneE164,
|
||||
}
|
||||
}
|
||||
|
||||
type publicreportSubscribePhoneIndexes struct {
|
||||
SubscribePhonePkey index
|
||||
}
|
||||
type publicreportSubscribePhoneIndexes struct{}
|
||||
|
||||
func (i publicreportSubscribePhoneIndexes) AsSlice() []index {
|
||||
return []index{
|
||||
i.SubscribePhonePkey,
|
||||
}
|
||||
return []index{}
|
||||
}
|
||||
|
||||
type publicreportSubscribePhoneForeignKeys struct {
|
||||
PublicreportSubscribePhoneSubscribePhoneDistrictIDFkey foreignKey
|
||||
PublicreportSubscribePhoneSubscribePhonePhoneE164Fkey foreignKey
|
||||
PublicreportSubscribePhoneSubscribePhonePhoneE164Fkey foreignKey
|
||||
}
|
||||
|
||||
func (f publicreportSubscribePhoneForeignKeys) AsSlice() []foreignKey {
|
||||
return []foreignKey{
|
||||
f.PublicreportSubscribePhoneSubscribePhoneDistrictIDFkey, f.PublicreportSubscribePhoneSubscribePhonePhoneE164Fkey,
|
||||
f.PublicreportSubscribePhoneSubscribePhonePhoneE164Fkey,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue