bikeshedder / tusker

PostgreSQL migration management tool
The Unlicense
208 stars 17 forks source link

Add --with-privileges options #3

Closed Swizz closed 4 years ago

Swizz commented 4 years ago

Hi !

We just found out it was needed in some cases to get the privileges migrations. Populating a new env using a migration without any privileges setted up do not suit enough our needs.

What do you think ?

Swizz commented 4 years ago

Here, we keep track of our entire database into a git repository. We create the schema by hand, then we use Tusker to generate the migration file to update on CI job the database according to the change made in the repository.

We also manage dynamic environments. Populating the new empty DB by this mean.

Without keeping track of the privileges in our repository, the new schema will not have any privileges set, and the job in need of the database will not be granted to use the tables as intended.

bikeshedder commented 4 years ago

Interesting use case. Never thought about using a schema migration tool that way. :+1:

Swizz commented 4 years ago

We are trying to achieve the whole insfrastructure as code thing.

Dont forget to publish :smile:

bikeshedder commented 4 years ago

Published. :+1:

https://pypi.org/project/tusker/0.2.1/