{"action":"created","issue":{"url":"https://api.github.com/repos/miguelgrinberg/Flask-Migrate/issues/85","labels_url":"https://api.github.com/repos/miguelgrinberg/Flask-Migrate/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/miguelgrinberg/Flask-Migrate/issues/85/comments","events_url":"https://api.github.com/repos/miguelgrinberg/Flask-Migrate/issues/85/events","html_url":"https://github.com/miguelgrinberg/Flask-Migrate/issues/85","id":107754732,"number":85,"title":"Not created table.","user":{"login":"Oleg-san","id":14790821,"avatar_url":"https://avatars.githubusercontent.com/u/14790821?v=3","gravatar_id":"","url":"https://api.github.com/users/Oleg-san","html_url":"https://github.com/Oleg-san","followers_url":"https://api.github.com/users/Oleg-san/followers","following_url":"https://api.github.com/users/Oleg-san/following{/other_user}","gists_url":"https://api.github.com/users/Oleg-san/gists{/gist_id}","starred_url":"https://api.github.com/users/Oleg-san/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Oleg-san/subscriptions","organizations_url":"https://api.github.com/users/Oleg-san/orgs","repos_url":"https://api.github.com/users/Oleg-san/repos","events_url":"https://api.github.com/users/Oleg-san/events{/privacy}","received_events_url":"https://api.github.com/users/Oleg-san/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-22T16:48:34Z","updated_at":"2015-09-22T22:48:46Z","closed_at":null,"body":"Hi!.\r\n\r\nThere is a sample application:\r\n```python\r\n# -*- coding: utf-8 -*-\r\nfrom flask import Flask\r\nfrom flask.ext.sqlalchemy import SQLAlchemy\r\nfrom flask.ext.script import Manager\r\nfrom flask.ext.migrate import Migrate, MigrateCommand\r\nfrom sqlalchemy.ext.declarative import declarative_base\r\n\r\napp = Flask(__name__)\r\napp.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///app.db'\r\n\r\ndb = SQLAlchemy(app)\r\nmigrate = Migrate(app, db)\r\n\r\nmanager = Manager(app)\r\nmanager.add_command('db', MigrateCommand)\r\n\r\n\r\nclass BaseModel:\r\n    def something(self):\r\n        pass\r\n\r\n\r\nBase = declarative_base(cls=BaseModel)\r\nBase.query = db.session.query_property()\r\n\r\n\r\nclass User(db.Model):\r\n    id = db.Column(db.Integer, primary_key=True)\r\n    name = db.Column(db.String(128))\r\n\r\n\r\nclass User2(BaseModel):\r\n    id = db.Column(db.Integer, primary_key=True)\r\n    name = db.Column(db.String(128))\r\n\r\n\r\nif __name__ == '__main__':\r\n    manager.run()\r\n\r\n```\r\n```\r\npython test.py db init\r\npython test.py db migrate\r\npython test.py db upgrade\r\n```\r\nWhy then, after you migrate the database table is not created for the model User2.\r\n```python\r\n\"\"\"empty message\r\n\r\nRevision ID: 309c4be10fc\r\nRevises: None\r\nCreate Date: 2015-09-22 21:34:23.391848\r\n\r\n\"\"\"\r\n\r\n# revision identifiers, used by Alembic.\r\nrevision = '309c4be10fc'\r\ndown_revision = None\r\n\r\nfrom alembic import op\r\nimport sqlalchemy as sa\r\n\r\n\r\ndef upgrade():\r\n    ### commands auto generated by Alembic - please adjust! ###\r\n    op.create_table('user',\r\n    sa.Column('id', sa.Integer(), nullable=False),\r\n    sa.Column('name', sa.String(length=128), nullable=True),\r\n    sa.PrimaryKeyConstraint('id')\r\n    )\r\n    ### end Alembic commands ###\r\n\r\n\r\ndef downgrade():\r\n    ### commands auto generated by Alembic - please adjust! ###\r\n    op.drop_table('user')\r\n    ### end Alembic commands ###\r\n```\r\nHow to do so that would be the same model User2 creates a table?\r\n\r\nSorry for my English"},"comment":{"url":"https://api.github.com/repos/miguelgrinberg/Flask-Migrate/issues/comments/142442912","html_url":"https://github.com/miguelgrinberg/Flask-Migrate/issues/85#issuecomment-142442912","issue_url":"https://api.github.com/repos/miguelgrinberg/Flask-Migrate/issues/85","id":142442912,"user":{"login":"miguelgrinberg","id":2715854,"avatar_url":"https://avatars.githubusercontent.com/u/2715854?v=3","gravatar_id":"","url":"https://api.github.com/users/miguelgrinberg","html_url":"https://github.com/miguelgrinberg","followers_url":"https://api.github.com/users/miguelgrinberg/followers","following_url":"https://api.github.com/users/miguelgrinberg/following{/other_user}","gists_url":"https://api.github.com/users/miguelgrinberg/gists{/gist_id}","starred_url":"https://api.github.com/users/miguelgrinberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miguelgrinberg/subscriptions","organizations_url":"https://api.github.com/users/miguelgrinberg/orgs","repos_url":"https://api.github.com/users/miguelgrinberg/repos","events_url":"https://api.github.com/users/miguelgrinberg/events{/privacy}","received_events_url":"https://api.github.com/users/miguelgrinberg/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T22:48:46Z","updated_at":"2015-09-22T22:48:46Z","body":"The `User2` class is not a SQLAlchemy model, it inherits from class `BaseModel`, which is not related to SQLAlchemy at all."}}