-
Notifications
You must be signed in to change notification settings - Fork 86
Description
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 run_one migrate(migrator, self.database, fake=fake) File "<string>", line 39, in migrate File "/mnt/c/Users/Simon Sorensen/Documents/GitHub/chronos/.venv/lib/python3.6/site-packages/peewee_migrate/migrator.py", line 105, in wrapper return method(migrator, migrator.orm[model], *args, **kwargs) KeyError: 'Script' Traceback (most recent call last): File "chronos.py", line 9, in <module> from chronos.runtime import * File "/mnt/c/Users/Simon Sorensen/Documents/GitHub/chronos/chronos/runtime.py", line 10, in <module> import chronos.metadata File "/mnt/c/Users/Simon Sorensen/Documents/GitHub/chronos/chronos/metadata.py", line 57, in <module> router.run() File "/mnt/c/Users/Simon Sorensen/Documents/GitHub/chronos/.venv/lib/python3.6/site-packages/peewee_migrate/router.py", line 182, in run self.run_one(mname, migrator, fake=fake, force=fake) File "/mnt/c/Users/Simon Sorensen/Documents/GitHub/chronos/.venv/lib/python3.6/site-packages/peewee_migrate/router.py", line 153, in run_one migrate(migrator, self.database, fake=fake) File "<string>", line 39, in migrate File "/mnt/c/Users/Simon Sorensen/Documents/GitHub/chronos/.venv/lib/python3.6/site-packages/peewee_migrate/migrator.py", line 105, in wrapper return method(migrator, migrator.orm[model], *args, **kwargs) KeyError: 'Script'
It looks like migrator.orm
is empty. What am I doing wrong?