{"action":"opened","issue":{"url":"https://api.github.com/repos/doctrine/migrations/issues/392","labels_url":"https://api.github.com/repos/doctrine/migrations/issues/392/labels{/name}","comments_url":"https://api.github.com/repos/doctrine/migrations/issues/392/comments","events_url":"https://api.github.com/repos/doctrine/migrations/issues/392/events","html_url":"https://github.com/doctrine/migrations/issues/392","id":122737103,"number":392,"title":"Problem with mssql addColumn when i need to set default in existing table with data","user":{"login":"inferno1992","id":3449794,"avatar_url":"https://avatars.githubusercontent.com/u/3449794?v=3","gravatar_id":"","url":"https://api.github.com/users/inferno1992","html_url":"https://github.com/inferno1992","followers_url":"https://api.github.com/users/inferno1992/followers","following_url":"https://api.github.com/users/inferno1992/following{/other_user}","gists_url":"https://api.github.com/users/inferno1992/gists{/gist_id}","starred_url":"https://api.github.com/users/inferno1992/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inferno1992/subscriptions","organizations_url":"https://api.github.com/users/inferno1992/orgs","repos_url":"https://api.github.com/users/inferno1992/repos","events_url":"https://api.github.com/users/inferno1992/events{/privacy}","received_events_url":"https://api.github.com/users/inferno1992/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-17T13:44:19Z","updated_at":"2015-12-17T13:44:19Z","closed_at":null,"body":"When i use code $schema->getTable('users')->addColumn('sex' , 'integer')->setDefault(0)\r\nDoctrine built two Queries: \r\n1. Alter table...\r\nand second\r\n2. Add constraint\r\n\r\nMigrations throws errow on first query.\r\n\r\nError shows up only when i have data in table users.\r\n\r\nI found solution, adding custom SQLServer2012Platform but there is a lot of private method that i need to copy.\r\n\r\nA simillar problem happend when a try drop column with constraint.\r\n\r\n"}}