{"action":"created","issue":{"url":"https://api.github.com/repos/Mashape/kong/issues/491","labels_url":"https://api.github.com/repos/Mashape/kong/issues/491/labels{/name}","comments_url":"https://api.github.com/repos/Mashape/kong/issues/491/comments","events_url":"https://api.github.com/repos/Mashape/kong/issues/491/events","html_url":"https://github.com/Mashape/kong/issues/491","id":102159133,"number":491,"title":"Cassandra preserve_host error after restarting Kong","user":{"login":"Gingonic","id":2501585,"avatar_url":"https://avatars.githubusercontent.com/u/2501585?v=3","gravatar_id":"","url":"https://api.github.com/users/Gingonic","html_url":"https://github.com/Gingonic","followers_url":"https://api.github.com/users/Gingonic/followers","following_url":"https://api.github.com/users/Gingonic/following{/other_user}","gists_url":"https://api.github.com/users/Gingonic/gists{/gist_id}","starred_url":"https://api.github.com/users/Gingonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gingonic/subscriptions","organizations_url":"https://api.github.com/users/Gingonic/orgs","repos_url":"https://api.github.com/users/Gingonic/repos","events_url":"https://api.github.com/users/Gingonic/events{/privacy}","received_events_url":"https://api.github.com/users/Gingonic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-20T14:58:39Z","updated_at":"2015-08-20T20:51:45Z","closed_at":null,"body":"After restarting the official docker container Kong 0.4.2 seems to want to update Casandra. I haven't updated the version.\r\n\r\n```\r\n[INFO] Connecting to the database...\r\n[ERR] Cassandra error: Cassandra returned error (Invalid): Invalid column name preserve_host because it conflicts with an existing column\r\n```\r\n\r\nMy migration table looks like this :\r\n\r\n```\r\n id         | migrations\r\n------------+------------------------------------------------------------------------------------------------------------------------------\r\n migrations | ['2015-01-12-175310_init_schema', '2015-01-12-175310_init_schema', '2015-04-24-154530_plugins', '2015-04-24-154530_plugins']\r\n```"},"comment":{"url":"https://api.github.com/repos/Mashape/kong/issues/comments/133167275","html_url":"https://github.com/Mashape/kong/issues/491#issuecomment-133167275","issue_url":"https://api.github.com/repos/Mashape/kong/issues/491","id":133167275,"user":{"login":"thibaultCha","id":1125431,"avatar_url":"https://avatars.githubusercontent.com/u/1125431?v=3","gravatar_id":"","url":"https://api.github.com/users/thibaultCha","html_url":"https://github.com/thibaultCha","followers_url":"https://api.github.com/users/thibaultCha/followers","following_url":"https://api.github.com/users/thibaultCha/following{/other_user}","gists_url":"https://api.github.com/users/thibaultCha/gists{/gist_id}","starred_url":"https://api.github.com/users/thibaultCha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thibaultCha/subscriptions","organizations_url":"https://api.github.com/users/thibaultCha/orgs","repos_url":"https://api.github.com/users/thibaultCha/repos","events_url":"https://api.github.com/users/thibaultCha/events{/privacy}","received_events_url":"https://api.github.com/users/thibaultCha/received_events","type":"User","site_admin":false},"created_at":"2015-08-20T20:51:45Z","updated_at":"2015-08-20T20:51:45Z","body":"There is something very wrong with your `schema_migrations` table. If I believe the error, its content should be:\r\n\r\n```\r\n id         | migrations\r\n------------+-------------------------------------------------------------------------------------------------------------------------------------------------\r\n migrations | ['2015-01-12-175310_init_schema', '2015-04-24-154530_plugins', '2015-05-22-235608_0.3.0', '2015-06-09-170921_0.4.0', '2015-08-10-813213_0.4.2']\r\n```\r\n\r\nI don't know what went wrong during your previous installation/migrations to cause this. A way to fix it would be to execute the following queries with cqlsh:\r\n\r\n```\r\nDELETE FROM schema_migrations WHERE id = 'migrations';\r\nINSERT INTO schema_migrations (id, migrations) VALUES('migrations', ['2015-01-12-175310_init_schema', '2015-04-24-154530_plugins', '2015-05-22-235608_0.3.0', '2015-06-09-170921_0.4.0', '2015-08-10-813213_0.4.2']);\r\n```\r\n\r\nNote that when 0.5.0 will be released, the schema changes will require that you run a python script to migrate your database, that will definitely be something to watch closely."}}