Documentation ¶
Index ¶
- func AddFloodChatIDDown(tx *sql.Tx) error
- func AddFloodChatIDUp(tx *sql.Tx) error
- func AddIsActiveToPokememesDown(tx *sql.Tx) error
- func AddIsActiveToPokememesUp(tx *sql.Tx) error
- func AddKarmaToPlayersDown(tx *sql.Tx) error
- func AddKarmaToPlayersUp(tx *sql.Tx) error
- func AddNewWeaponDown(tx *sql.Tx) error
- func AddNewWeaponUp(tx *sql.Tx) error
- func AddPokememesWealthDown(tx *sql.Tx) error
- func AddPokememesWealthUp(tx *sql.Tx) error
- func AddUserTypeDown(tx *sql.Tx) error
- func AddUserTypeUp(tx *sql.Tx) error
- func ChangeChatTypeColumnDown(tx *sql.Tx) error
- func ChangeChatTypeColumnUp(tx *sql.Tx) error
- func ChangeProfilePokememesColumnsDown(tx *sql.Tx) error
- func ChangeProfilePokememesColumnsUp(tx *sql.Tx) error
- func ChangeSquadsTableDown(tx *sql.Tx) error
- func ChangeSquadsTableUp(tx *sql.Tx) error
- func ChangeTelegramIDColumnDown(tx *sql.Tx) error
- func ChangeTelegramIDColumnUp(tx *sql.Tx) error
- func CreateAlarmsDown(tx *sql.Tx) error
- func CreateAlarmsUp(tx *sql.Tx) error
- func CreateBroadcastsDown(tx *sql.Tx) error
- func CreateBroadcastsUp(tx *sql.Tx) error
- func CreateChatsDown(tx *sql.Tx) error
- func CreateChatsUp(tx *sql.Tx) error
- func CreateElementsDown(tx *sql.Tx) error
- func CreateElementsUp(tx *sql.Tx) error
- func CreateLeaguesDown(tx *sql.Tx) error
- func CreateLeaguesUp(tx *sql.Tx) error
- func CreateLocationsDown(tx *sql.Tx) error
- func CreateLocationsUp(tx *sql.Tx) error
- func CreateOrdersCompletionsDown(tx *sql.Tx) error
- func CreateOrdersCompletionsUp(tx *sql.Tx) error
- func CreateOrdersDown(tx *sql.Tx) error
- func CreateOrdersUp(tx *sql.Tx) error
- func CreatePlayersDown(tx *sql.Tx) error
- func CreatePlayersUp(tx *sql.Tx) error
- func CreatePokememesDown(tx *sql.Tx) error
- func CreatePokememesUp(tx *sql.Tx) error
- func CreateProfileRelationsDown(tx *sql.Tx) error
- func CreateProfileRelationsUp(tx *sql.Tx) error
- func CreateProfilesDown(tx *sql.Tx) error
- func CreateProfilesUp(tx *sql.Tx) error
- func CreateRelationsDown(tx *sql.Tx) error
- func CreateRelationsUp(tx *sql.Tx) error
- func CreateSquadsDown(tx *sql.Tx) error
- func CreateSquadsUp(tx *sql.Tx) error
- func CreateTournamentReportsDown(tx *sql.Tx) error
- func CreateTournamentReportsUp(tx *sql.Tx) error
- func CreateWeaponsAndAddWealthDown(tx *sql.Tx) error
- func CreateWeaponsAndAddWealthUp(tx *sql.Tx) error
- func DeleteDataMappedTablesDown(tx *sql.Tx) error
- func DeleteDataMappedTablesUp(tx *sql.Tx) error
- func DeletePokememesTablesDown(tx *sql.Tx) error
- func DeletePokememesTablesUp(tx *sql.Tx) error
- func FixLeaguesNamesDown(tx *sql.Tx) error
- func FixLeaguesNamesUp(tx *sql.Tx) error
- func FixLocationsDown(tx *sql.Tx) error
- func FixLocationsUp(tx *sql.Tx) error
- func FixTimeElementDown(tx *sql.Tx) error
- func FixTimeElementUp(tx *sql.Tx) error
- func HelloUp(tx *sql.Tx) error
- func New(ac *appcontext.Context)
- func ProfileDataAdditionsDown(tx *sql.Tx) error
- func ProfileDataAdditionsUp(tx *sql.Tx) error
- func RemoveReusableDown(tx *sql.Tx) error
- func RemoveReusableUp(tx *sql.Tx) error
- func UpdateLeaguesDown(tx *sql.Tx) error
- func UpdateLeaguesUp(tx *sql.Tx) error
- func UpdateLocationsDown(tx *sql.Tx) error
- func UpdateLocationsUp(tx *sql.Tx) error
- type Migrations
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFloodChatIDDown ¶
AddFloodChatIDDown destroys `flood_chat_id` column
func AddFloodChatIDUp ¶
AddFloodChatIDUp creates `flood_chat_id` column in `squads` table
func AddIsActiveToPokememesDown ¶
AddIsActiveToPokememesDown removes `is_active` from `pokememes` table
func AddIsActiveToPokememesUp ¶
AddIsActiveToPokememesUp adds `is_active` to `pokememes`
func AddKarmaToPlayersDown ¶
AddKarmaToPlayersDown destroys `karma` column
func AddKarmaToPlayersUp ¶
AddKarmaToPlayersUp creates `karma` column in `players` table
func AddNewWeaponUp ¶
AddNewWeaponUp adds new weapon, presented on 26.11.2017
func AddPokememesWealthDown ¶
AddPokememesWealthDown restores mid-October behaviour
func AddPokememesWealthUp ¶
AddPokememesWealthUp prepares database for latest game update in mid-October
func AddUserTypeDown ¶
AddUserTypeDown destroys `user_type` column
func AddUserTypeUp ¶
AddUserTypeUp creates `user_type` column in `squads_players` table
func ChangeChatTypeColumnDown ¶
ChangeChatTypeColumnDown changes `chat_type` column of `chats` table
func ChangeChatTypeColumnUp ¶
ChangeChatTypeColumnUp changes `chat_type` column of `chats` table
func ChangeProfilePokememesColumnsDown ¶
ChangeProfilePokememesColumnsDown restores mid-October behaviour
func ChangeProfilePokememesColumnsUp ¶
ChangeProfilePokememesColumnsUp prepares database for latest game update in mid-October
func ChangeSquadsTableDown ¶
ChangeSquadsTableDown reverts `squads` to old format
func ChangeSquadsTableUp ¶
ChangeSquadsTableUp changes `sqauds` to new format
func ChangeTelegramIDColumnDown ¶
ChangeTelegramIDColumnDown changes `telegram_id` column of `chats` table
func ChangeTelegramIDColumnUp ¶
ChangeTelegramIDColumnUp changes `telegram_id` column of `chats` table
func CreateAlarmsDown ¶
CreateAlarmsDown drops `alarms` table
func CreateBroadcastsDown ¶
CreateBroadcastsDown drops `broadcasts` table
func CreateBroadcastsUp ¶
CreateBroadcastsUp creates `broadcasts` table
func CreateElementsDown ¶
CreateElementsDown drops `elements` table
func CreateElementsUp ¶
CreateElementsUp creates `elements` table and fills it with data
func CreateLeaguesDown ¶
CreateLeaguesDown drops `leagues` table
func CreateLeaguesUp ¶
CreateLeaguesUp creates `leagues` table and fills it with data
func CreateLocationsDown ¶
CreateLocationsDown drops `locations` table
func CreateLocationsUp ¶
CreateLocationsUp creates `locations` table and fills it with data
func CreateOrdersCompletionsDown ¶
CreateOrdersCompletionsDown drops `orders_completions` table
func CreateOrdersCompletionsUp ¶
CreateOrdersCompletionsUp creates `orders_completions` table
func CreateOrdersDown ¶
CreateOrdersDown drops `chats` table
func CreatePlayersDown ¶
CreatePlayersDown drops `players` table
func CreatePlayersUp ¶
CreatePlayersUp creates `players` table
func CreatePokememesDown ¶
CreatePokememesDown drops `pokememes` table
func CreatePokememesUp ¶
CreatePokememesUp creates `pokememes` table
func CreateProfileRelationsDown ¶
CreateProfileRelationsDown drops profile-pokememes relation table
func CreateProfileRelationsUp ¶
CreateProfileRelationsUp creates profile-pokememes relation table
func CreateProfilesDown ¶
CreateProfilesDown drops `profiles` table
func CreateProfilesUp ¶
CreateProfilesUp creates `profiles` table
func CreateRelationsDown ¶
CreateRelationsDown drops pokememe-* relations tables
func CreateRelationsUp ¶
CreateRelationsUp creates tables for pokememes-locations and pokememes-elements links
func CreateSquadsDown ¶
CreateSquadsDown drops `squads` table
func CreateTournamentReportsDown ¶
CreateTournamentReportsDown drops `tournament_reports` table
func CreateTournamentReportsUp ¶
CreateTournamentReportsUp creates `tournament_reports` table
func CreateWeaponsAndAddWealthDown ¶
CreateWeaponsAndAddWealthDown drops `weapons` table and `wealth` column of `profiles` table
func CreateWeaponsAndAddWealthUp ¶
CreateWeaponsAndAddWealthUp creates `weapons` table and adds `wealth` column to `profiles`
func DeleteDataMappedTablesDown ¶
DeleteDataMappedTablesDown returns old tables with all data
func DeleteDataMappedTablesUp ¶
DeleteDataMappedTablesUp drops `locations`, `elements`, `weapons` and `leagues` tables These tables data is rarely changed, so I decided to hold such data in source code
func DeletePokememesTablesDown ¶
DeletePokememesTablesDown does nothing, because after nerf old information isn't needed at all
func DeletePokememesTablesUp ¶
DeletePokememesTablesUp drops `pokememes`, `pokememes_elements` and `pokememes_locations` tables These tables data is rarely changed, so I decided to hold such data in source code
func FixLeaguesNamesDown ¶
FixLeaguesNamesDown does nothing
func FixLeaguesNamesUp ¶
FixLeaguesNamesUp fixes league naming issues
func FixTimeElementDown ¶
FixTimeElementDown returns fucked up emoji of time element for sanity
func FixTimeElementUp ¶
FixTimeElementUp fixes time element emoji
func New ¶
func New(ac *appcontext.Context)
New is an initialization function for migrations package
func ProfileDataAdditionsDown ¶
ProfileDataAdditionsDown drops `levels` table and `pokeballs` column of `profiles` table
func ProfileDataAdditionsUp ¶
ProfileDataAdditionsUp creates some helping databases for profiles
func RemoveReusableDown ¶
RemoveReusableDown reverts `reusable` column
func RemoveReusableUp ¶
RemoveReusableUp removes `reusable` field in `orders` table
func UpdateLeaguesDown ¶
UpdateLeaguesDown returns leagues emoji fuckup for sanity purposes
func UpdateLeaguesUp ¶
UpdateLeaguesUp fixes some fuckup with leagues' emoji
func UpdateLocationsDown ¶
UpdateLocationsDown returns location emoji fuckup for sanity purposes
func UpdateLocationsUp ¶
UpdateLocationsUp fixes some fuckup with locations' emoji
Types ¶
type Migrations ¶
type Migrations struct{}
Migrations handles all functions of migrations package
func (*Migrations) Migrate ¶
func (m *Migrations) Migrate() error
Migrate migrates database to current version
func (*Migrations) SetDialect ¶
func (m *Migrations) SetDialect(dialect string) error
SetDialect sets dialect for migrations
Source Files ¶
- 10_update_leagues.go
- 11_profile_data_additions.go
- 12_create_profile_relations.go
- 13_create_weapons_and_add_wealth.go
- 14_fix_time_element.go
- 15_create_chats.go
- 16_change_chat_type_column.go
- 17_change_profile_pokememes_columns.go
- 18_add_pokememes_wealth.go
- 19_create_broadcasts.go
- 1_hello.go
- 20_create_squads.go
- 21_change_telegram_id_column.go
- 22_add_flood_chat_id.go
- 23_add_user_type.go
- 24_create_orders.go
- 25_remove_reusable.go
- 26_create_orders_competions.go
- 27_add_new_weapon.go
- 28_fix_locations.go
- 29_fix_leagues_names.go
- 2_create_players.go
- 30_create_alarms.go
- 31_change_squads_table.go
- 32_add_is_active_to_pokememes.go
- 33_delete_datamapped_tables.go
- 34_delete_pokememes_tables.go
- 35_add_karma_to_players.go
- 36_create_tournament_reports.go
- 3_create_profiles.go
- 4_create_pokememes.go
- 5_create_locations.go
- 6_create_elements.go
- 7_create_leagues.go
- 8_create_relations.go
- 9_update_locations.go
- exported.go
- migrations.go