peewee_migrate
peewee_migrate copied to clipboard
Simple migration engine for Peewee
Hi, I,m define datetime field in parent model, and set datetime defualt in parent model like: ` class MetaModel(Model): id = AutoField(primary_key=True) create_time = DateTimeField(default=lambda: dt.datetime.now()) update_time = DateTimeField(default=lambda: dt.datetime.now())...
The model definition seems like: ```python class MySQLTimestampField(TimestampField): field_type = 'timestamp' class Table1(Model): timestamp_field = MySQLTimestampField() ``` and the generated code seems like: ```python import peewee as pw ... @migrator.create_model...
**Describe the bug** A clear and concise description of what the bug is. **To Reproduce** ``` import peewee as pw # from template.txt ... @migrator.create_model class CollectDevice(pw.Model): pw = pw.DecimalField(auto_round=False,...
Guys. Till ``klen`` in "vacation" i started a fork with critical fixups. PR and suggestions are welcome, Make This Package Great Again 👍 https://github.com/spumer/peewee_migrate2
Hi there, first of all thank you so much for taking the time and publishing this library, appreciate it a lot since peewee doesn't come with automatic migrations included. I'm...
Fixes # Changes is in this PR - Fixed a bug when using a migration with the same name, the version is constantly promoted regardless of the specified name
I have a model with a few fields. In the next version of my program, I want to add another field. I add it to the model class and write...
I'm trying to add a field using the following code: `migrator.add_fields('Script', 'cron')` This is the ouput: `Migration failed: 001_add_cron Traceback (most recent call last): File "/mnt/c/Users/Simon Sorensen/Documents/GitHub/chronos/.venv/lib/python3.6/site-packages/peewee_migrate/router.py", line 153, in...
I added a "multi-column index unique" definition according to the PeeWee documentation: http://docs.peewee-orm.com/en/latest/peewee/models.html#indexes-and-constraints but when I run **peewee_migrate** it doesn't generate the statements for the multi-column index. I was taking...
- python 3.6 - peewee == 2.9.0 - Peewee_migrate == 0.11.0 Command: `pw_migrate create --auto my.models --database postgresql://localhost:5432/name auto-generated.py` ``` migrations = diff_many(models, source, migrator, reverse=reverse) File "env/lib/python3.6/site-packages/peewee_migrate/auto.py", line 115,...