{"repo":"Pogchamp-company/alembic-postgresql-enum","free":true,"listed":false,"github":"https://github.com/Pogchamp-company/alembic-postgresql-enum","clone":"git clone https://github.com/Pogchamp-company/alembic-postgresql-enum.git","description":"Alembic autogenerate support for creation, alteration and deletion of enums","language":"Python","stars":345,"topics":["alembic","alter","autogenerate","create","enum","postgres","postgresql","alembic-extension"],"license":"MIT","category":"databases-storage","readme_excerpt":"alembic-postgresql-enum Alembic autogenerate support for creation, alteration and deletion of enums Alembic will now automatically: - Create enums that currently are not in postgres schema - Remove/add/alter enum values - Reorder enum values - Delete unused enums from schema If you are curious to know about analogs and reasons for this library to exist see alternatives and motivation Usage Install library: Add the line: To the top of your migrations/env.py file. This import will affect newly generated migrations. To try it out you can edit some enums in your schema and then run alembic revision --autogenerate Features Creation of enums Deletion of unreferenced enums Detection of enum values changes Creation of new enum values Deletion of enums values Renaming of enum values Partial index preservation Omitting managing enums Creation of enum When table is created This code will generate migration given below: When column is added This code will generate migration given below: Deletion of unreferenced enum If enum is defined in postgres schema, but its mentions removed from code - It will be automatically removed Detection of enum values changes Can be disabled with detect enum values changes configuration flag turned off Creation of new enum values If new enum value is defined sync enum values function call will be added to migration to account for it Deletion of enums values If enum value is removed it also will be detected Rename enum value In this case you must manually edi","default_branch":null,"files":null,"tree":[],"storefront":"/r/Pogchamp-company","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Pogchamp-company/alembic-postgresql-enum/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}