How to handle plugin Schema migrations?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 48
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Hi guys. I was learning how to create plugins for kong using the python-pdk and it wasn't clear how to handle plugin schema migrations.
From what I understand about lua-pdk, to handle migrations, it's just need to create a migrations directory inside the plugin directory and write the migrations with raw SQL in files in the following format 000_<custom_name>.lua, and in the file init.lua, inside the migrations directory, which I believe is equivalent to python's __init__.py, is necessary to return a set with the filenames in the order they should be applied.
It seems to me that kong already handles the discovery of migration files, and to apply them just run kong's CLI (kong migrations up).
Does this whole process also apply to python-pdk?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the python-pdk plugin structure with the lua-pdk migration convention described in the issue: the migrations directory, numbered migration files, migrations/init.lua, and the kong migrations up CLI command. Document whether this process applies to Python plugins, including the expected migration file layout and how migrations are discovered and run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, database
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100