> flask db migrate -m "add memberservice, memberalias tables"
C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\flask_sqlalchemy\__init__.py:88: SAWarning: Can't validate argument 'bind_key'; can't locate any SQLAlchemy dialect named 'bind'
return sqlalchemy.Table(*args, **kwargs)
INFO [alembic.env] Migrating database <default>
migrations\env.py:55: SAWarning: Can't validate argument 'bind_key'; can't locate any SQLAlchemy dialect named 'bind'
t.tometadata(m)
INFO [alembic.runtime.migration] Context impl MySQLImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\scripts\flask.exe\__main__.py", line 7, in <module>
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\flask\cli.py", line 986, in main
cli.main()
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\flask\cli.py", line 567, in main
return super().main(*args, **kwargs)
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\click\core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\click\decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\flask\cli.py", line 407, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\flask_migrate\cli.py", line 104, in migrate
_migrate(directory, message, sql, head, splice, branch_label, version_path,
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\flask_migrate\__init__.py", line 98, in wrapped
f(*args, **kwargs)
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\flask_migrate\__init__.py", line 155, in migrate
command.revision(config, message, autogenerate=True, sql=sql,
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\alembic\command.py", line 229, in revision
script_directory.run_env()
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\alembic\script\base.py", line 569, in run_env
util.load_python_file(self.dir, "env.py")
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\alembic\util\pyfiles.py", line 94, in load_python_file
module = load_module_py(module_id, path)
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\alembic\util\pyfiles.py", line 110, in load_module_py
spec.loader.exec_module(module) # type: ignore
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "migrations\env.py", line 179, in <module>
run_migrations_online()
File "migrations\env.py", line 159, in run_migrations_online
context.run_migrations(engine_name=name)
File "<string>", line 8, in run_migrations
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\alembic\runtime\environment.py", line 853, in run_migrations
self.get_context().run_migrations(**kw)
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\alembic\runtime\migration.py", line 611, in run_migrations
for step in self._migrations_fn(heads, self):
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\alembic\command.py", line 205, in retrieve_migrations
revision_context.run_autogenerate(rev, context)
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\alembic\autogenerate\api.py", line 526, in run_autogenerate
self._run_environment(rev, migration_context, True)
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\alembic\autogenerate\api.py", line 573, in _run_environment
compare._populate_migration_script(
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\alembic\autogenerate\compare.py", line 55, in _populate_migration_script
_produce_net_changes(autogen_context, upgrade_ops)
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\alembic\autogenerate\compare.py", line 89, in _produce_net_changes
comparators.dispatch("schema", autogen_context.dialect.name)(
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\alembic\util\langhelpers.py", line 267, in go
fn(*arg, **kw)
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\alembic\autogenerate\compare.py", line 125, in _autogen_for_tables
[(table.schema, table.name) for table in autogen_context.sorted_tables]
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\sqlalchemy\util\langhelpers.py", line 1113, in __get__
obj.__dict__[self.__name__] = result = self.fget(obj)
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\alembic\autogenerate\api.py", line 443, in sorted_tables
result.extend(m.sorted_tables)
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\sqlalchemy\sql\schema.py", line 4725, in sorted_tables
return ddl.sort_tables(
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\sqlalchemy\sql\ddl.py", line 1213, in sort_tables
for (t, fkcs) in sort_tables_and_constraints(
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\sqlalchemy\sql\ddl.py", line 1291, in sort_tables_and_constraints
dependent_on = fkc.referred_table
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\sqlalchemy\sql\schema.py", line 3832, in referred_table
return self.elements[0].column.table
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\sqlalchemy\util\langhelpers.py", line 1113, in __get__
obj.__dict__[self.__name__] = result = self.fget(obj)
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\sqlalchemy\sql\schema.py", line 2518, in column
return self._resolve_column()
File "C:\Users\lking\Documents\Lou's Software\projects\members\members\venv\lib\site-packages\sqlalchemy\sql\schema.py", line 2529, in _resolve_column
raise exc.NoReferencedTableError(
sqlalchemy.exc.NoReferencedTableError: Foreign key associated with column 'apps_interests.application_id' could not find table 'application' with which to generate a foreign key to target column 'id'