This is extremely useful for testing. In order to do this I needed to actually deploy the migration to a bob fork so I could start to add support for behaviors I really want. Specifically the ability to search for ids in a slice.
192 lines
4.1 KiB
Go
192 lines
4.1 KiB
Go
// Code generated by BobGen psql v0.42.5. 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 NoteImages = Table[
|
|
noteImageColumns,
|
|
noteImageIndexes,
|
|
noteImageForeignKeys,
|
|
noteImageUniques,
|
|
noteImageChecks,
|
|
]{
|
|
Schema: "",
|
|
Name: "note_image",
|
|
Columns: noteImageColumns{
|
|
Created: column{
|
|
Name: "created",
|
|
DBType: "timestamp without time zone",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
CreatorID: column{
|
|
Name: "creator_id",
|
|
DBType: "integer",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Deleted: column{
|
|
Name: "deleted",
|
|
DBType: "timestamp without time zone",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
DeletorID: column{
|
|
Name: "deletor_id",
|
|
DBType: "integer",
|
|
Default: "NULL",
|
|
Comment: "",
|
|
Nullable: true,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
OrganizationID: column{
|
|
Name: "organization_id",
|
|
DBType: "integer",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
Version: column{
|
|
Name: "version",
|
|
DBType: "integer",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
UUID: column{
|
|
Name: "uuid",
|
|
DBType: "uuid",
|
|
Default: "",
|
|
Comment: "",
|
|
Nullable: false,
|
|
Generated: false,
|
|
AutoIncr: false,
|
|
},
|
|
},
|
|
Indexes: noteImageIndexes{
|
|
NoteImagePkey: index{
|
|
Type: "btree",
|
|
Name: "note_image_pkey",
|
|
Columns: []indexColumn{
|
|
{
|
|
Name: "version",
|
|
Desc: null.FromCond(false, true),
|
|
IsExpression: false,
|
|
},
|
|
{
|
|
Name: "uuid",
|
|
Desc: null.FromCond(false, true),
|
|
IsExpression: false,
|
|
},
|
|
},
|
|
Unique: true,
|
|
Comment: "",
|
|
NullsFirst: []bool{false, false},
|
|
NullsDistinct: false,
|
|
Where: "",
|
|
Include: []string{},
|
|
},
|
|
},
|
|
PrimaryKey: &constraint{
|
|
Name: "note_image_pkey",
|
|
Columns: []string{"version", "uuid"},
|
|
Comment: "",
|
|
},
|
|
ForeignKeys: noteImageForeignKeys{
|
|
NoteImageNoteImageCreatorIDFkey: foreignKey{
|
|
constraint: constraint{
|
|
Name: "note_image.note_image_creator_id_fkey",
|
|
Columns: []string{"creator_id"},
|
|
Comment: "",
|
|
},
|
|
ForeignTable: "user_",
|
|
ForeignColumns: []string{"id"},
|
|
},
|
|
NoteImageNoteImageDeletorIDFkey: foreignKey{
|
|
constraint: constraint{
|
|
Name: "note_image.note_image_deletor_id_fkey",
|
|
Columns: []string{"deletor_id"},
|
|
Comment: "",
|
|
},
|
|
ForeignTable: "user_",
|
|
ForeignColumns: []string{"id"},
|
|
},
|
|
NoteImageNoteImageOrganizationIDFkey: foreignKey{
|
|
constraint: constraint{
|
|
Name: "note_image.note_image_organization_id_fkey",
|
|
Columns: []string{"organization_id"},
|
|
Comment: "",
|
|
},
|
|
ForeignTable: "organization",
|
|
ForeignColumns: []string{"id"},
|
|
},
|
|
},
|
|
|
|
Comment: "",
|
|
}
|
|
|
|
type noteImageColumns struct {
|
|
Created column
|
|
CreatorID column
|
|
Deleted column
|
|
DeletorID column
|
|
OrganizationID column
|
|
Version column
|
|
UUID column
|
|
}
|
|
|
|
func (c noteImageColumns) AsSlice() []column {
|
|
return []column{
|
|
c.Created, c.CreatorID, c.Deleted, c.DeletorID, c.OrganizationID, c.Version, c.UUID,
|
|
}
|
|
}
|
|
|
|
type noteImageIndexes struct {
|
|
NoteImagePkey index
|
|
}
|
|
|
|
func (i noteImageIndexes) AsSlice() []index {
|
|
return []index{
|
|
i.NoteImagePkey,
|
|
}
|
|
}
|
|
|
|
type noteImageForeignKeys struct {
|
|
NoteImageNoteImageCreatorIDFkey foreignKey
|
|
NoteImageNoteImageDeletorIDFkey foreignKey
|
|
NoteImageNoteImageOrganizationIDFkey foreignKey
|
|
}
|
|
|
|
func (f noteImageForeignKeys) AsSlice() []foreignKey {
|
|
return []foreignKey{
|
|
f.NoteImageNoteImageCreatorIDFkey, f.NoteImageNoteImageDeletorIDFkey, f.NoteImageNoteImageOrganizationIDFkey,
|
|
}
|
|
}
|
|
|
|
type noteImageUniques struct{}
|
|
|
|
func (u noteImageUniques) AsSlice() []constraint {
|
|
return []constraint{}
|
|
}
|
|
|
|
type noteImageChecks struct{}
|
|
|
|
func (c noteImageChecks) AsSlice() []check {
|
|
return []check{}
|
|
}
|