{"action":"created","issue":{"url":"https://api.github.com/repos/miguelgrinberg/Flask-Migrate/issues/143","repository_url":"https://api.github.com/repos/miguelgrinberg/Flask-Migrate","labels_url":"https://api.github.com/repos/miguelgrinberg/Flask-Migrate/issues/143/labels{/name}","comments_url":"https://api.github.com/repos/miguelgrinberg/Flask-Migrate/issues/143/comments","events_url":"https://api.github.com/repos/miguelgrinberg/Flask-Migrate/issues/143/events","html_url":"https://github.com/miguelgrinberg/Flask-Migrate/issues/143","id":199633690,"number":143,"title":"Migrate detects same thing again and again and not the default values","user":{"login":"deveshaggrawal19","id":17562041,"avatar_url":"https://avatars1.githubusercontent.com/u/17562041?v=4","gravatar_id":"","url":"https://api.github.com/users/deveshaggrawal19","html_url":"https://github.com/deveshaggrawal19","followers_url":"https://api.github.com/users/deveshaggrawal19/followers","following_url":"https://api.github.com/users/deveshaggrawal19/following{/other_user}","gists_url":"https://api.github.com/users/deveshaggrawal19/gists{/gist_id}","starred_url":"https://api.github.com/users/deveshaggrawal19/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deveshaggrawal19/subscriptions","organizations_url":"https://api.github.com/users/deveshaggrawal19/orgs","repos_url":"https://api.github.com/users/deveshaggrawal19/repos","events_url":"https://api.github.com/users/deveshaggrawal19/events{/privacy}","received_events_url":"https://api.github.com/users/deveshaggrawal19/received_events","type":"User","site_admin":false},"labels":[{"id":55528358,"url":"https://api.github.com/repos/miguelgrinberg/Flask-Migrate/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-01-09T18:59:30Z","updated_at":"2018-03-06T03:50:46Z","closed_at":null,"author_association":"NONE","body":"I'm trying to migrate for new columns with default values, but it is not reading those changes, rather only default values of boolean type are read that too again and again. I don't know why this is happening. Can you please guide me.\r\n\r\n(env) devesh@SERVER:/srv/www/waasle$ python manage.py db migrate\r\nINFO  [alembic.runtime.migration] Context impl MySQLImpl.\r\nINFO  [alembic.runtime.migration] Will assume non-transactional DDL.\r\nINFO  [alembic.autogenerate.compare] Detected type change from TINYINT(display_width=1) to Boolean() on 'orders.complete'\r\nINFO  [alembic.autogenerate.compare] Detected type change from TINYINT(display_width=1) to Boolean() on 'tranactions.type'\r\nINFO  [alembic.autogenerate.compare] Detected type change from TINYINT(display_width=1) to Boolean() on 'users.confirmed'\r\n  Generating /srv/www/waasle/migrations/versions/4da4194e339d_.py ... done\r\n(env) devesh@SERVER:/srv/www/waasle$ python manage.py db upgrade\r\nINFO  [alembic.runtime.migration] Context impl MySQLImpl.\r\nINFO  [alembic.runtime.migration] Will assume non-transactional DDL.\r\nINFO  [alembic.runtime.migration] Running upgrade 8735ffa147c0 -> 4da4194e339d, empty message"},"comment":{"url":"https://api.github.com/repos/miguelgrinberg/Flask-Migrate/issues/comments/370653565","html_url":"https://github.com/miguelgrinberg/Flask-Migrate/issues/143#issuecomment-370653565","issue_url":"https://api.github.com/repos/miguelgrinberg/Flask-Migrate/issues/143","id":370653565,"user":{"login":"5uper5hoot","id":20659309,"avatar_url":"https://avatars0.githubusercontent.com/u/20659309?v=4","gravatar_id":"","url":"https://api.github.com/users/5uper5hoot","html_url":"https://github.com/5uper5hoot","followers_url":"https://api.github.com/users/5uper5hoot/followers","following_url":"https://api.github.com/users/5uper5hoot/following{/other_user}","gists_url":"https://api.github.com/users/5uper5hoot/gists{/gist_id}","starred_url":"https://api.github.com/users/5uper5hoot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/5uper5hoot/subscriptions","organizations_url":"https://api.github.com/users/5uper5hoot/orgs","repos_url":"https://api.github.com/users/5uper5hoot/repos","events_url":"https://api.github.com/users/5uper5hoot/events{/privacy}","received_events_url":"https://api.github.com/users/5uper5hoot/received_events","type":"User","site_admin":false},"created_at":"2018-03-06T03:50:46Z","updated_at":"2018-03-06T03:50:46Z","author_association":"NONE","body":"A little late but I only came across this today after encountering something similar and Mike Bayer has covered it:\r\n\r\nhttps://bitbucket.org/zzzeek/alembic/issues/46/mysqltinyint-display_width-1-vs-saboolean\r\n\r\nMySQL BOOLEAN types always feature in revisions because the MySQL BOOLEAN is just an alias for TINYINT(1). SQLAlchemy will not make the assumption that a TINYINT(1) is meant to be a BOOLEAN as it might not be the case. As such, every time the revision is run, it compares the TINYINT in the inspected type to the BOOLEAN in the metadata type and determines that they are not the same.\r\n\r\nYou can either define Booleans in your model as TINYINT(display_width=1) or create your own type comparison function that overrides the type checking for the specific instance:\r\n\r\nhttp://alembic.zzzcomputing.com/en/latest/autogenerate.html#comparing-types\r\n\r\n"}}
{"actor":{"display_login":"5uper5hoot"}}