Skip to content

Commit

Permalink
chore(migrations) remove deprecated Cassandra migrations helpers (#8781)
Browse files Browse the repository at this point in the history
### Summary

This library had only one function left uncommented and that
was about `Cassandra`. As `Cassandra` is deprecated with upcoming
`3.0.0`, we don't use / need this anymore, thus removing it.
  • Loading branch information
bungle committed May 16, 2022
1 parent dd7f298 commit 82fa99d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 363 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@
[#8552](https://github.com/Kong/kong/pull/8552). If you are using
[Go plugin server](https://github.com/Kong/go-pluginserver), please migrate your plugins to use the
[Go PDK](https://github.com/Kong/go-pdk) before upgrading.
- The migration helper library is no longer supplied with Kong (we didn't use it for anything,
and the only function it had, was for the deprecated Cassandra).
[#8781](https://github.com/Kong/kong/pull/8781)


#### Plugins
Expand Down
1 change: 0 additions & 1 deletion kong-2.8.0-0.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ build = {
["kong.db.strategies.off.tags"] = "kong/db/strategies/off/tags.lua",

["kong.db.migrations.state"] = "kong/db/migrations/state.lua",
["kong.db.migrations.helpers"] = "kong/db/migrations/helpers.lua",
["kong.db.migrations.subsystems"] = "kong/db/migrations/subsystems.lua",
["kong.db.migrations.core"] = "kong/db/migrations/core/init.lua",
["kong.db.migrations.core.000_base"] = "kong/db/migrations/core/000_base.lua",
Expand Down
10 changes: 2 additions & 8 deletions kong/db/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,6 @@ end
do
-- migrations
local utils = require "kong.tools.utils"
local MigrationHelpers = require "kong.db.migrations.helpers"
local MigrationsState = require "kong.db.migrations.state"


Expand Down Expand Up @@ -517,8 +516,6 @@ do
return nil, prefix_err(self, err)
end

local mig_helpers = MigrationHelpers.new(self.connector)

local n_migrations = 0
local n_pending = 0

Expand Down Expand Up @@ -558,9 +555,7 @@ do
end

if strategy_migration.up_f then
local pok, perr, err = xpcall(strategy_migration.up_f,
debug.traceback, self.connector,
mig_helpers)
local pok, perr, err = xpcall(strategy_migration.up_f, debug.traceback, self.connector)
if not pok or err then
self.connector:close()
return nil, fmt_err(self, "failed to run migration '%s' up_f: %s",
Expand Down Expand Up @@ -601,8 +596,7 @@ do
-- kong migrations teardown
local f = strategy_migration.teardown

local pok, perr, err = xpcall(f, debug.traceback, self.connector,
mig_helpers)
local pok, perr, err = xpcall(f, debug.traceback, self.connector)
if not pok or err then
self.connector:close()
return nil, fmt_err(self, "failed to run migration '%s' teardown: %s",
Expand Down
Loading

0 comments on commit 82fa99d

Please sign in to comment.