{"action":"created","issue":{"url":"https://api.github.com/repos/DbUp/DbUp/issues/248","repository_url":"https://api.github.com/repos/DbUp/DbUp","labels_url":"https://api.github.com/repos/DbUp/DbUp/issues/248/labels{/name}","comments_url":"https://api.github.com/repos/DbUp/DbUp/issues/248/comments","events_url":"https://api.github.com/repos/DbUp/DbUp/issues/248/events","html_url":"https://github.com/DbUp/DbUp/issues/248","id":218057105,"number":248,"title":"Firebird constantly trying to create SchemaVersions table","user":{"login":"Brett-Gladman","id":26781285,"avatar_url":"https://avatars0.githubusercontent.com/u/26781285?v=3","gravatar_id":"","url":"https://api.github.com/users/Brett-Gladman","html_url":"https://github.com/Brett-Gladman","followers_url":"https://api.github.com/users/Brett-Gladman/followers","following_url":"https://api.github.com/users/Brett-Gladman/following{/other_user}","gists_url":"https://api.github.com/users/Brett-Gladman/gists{/gist_id}","starred_url":"https://api.github.com/users/Brett-Gladman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Brett-Gladman/subscriptions","organizations_url":"https://api.github.com/users/Brett-Gladman/orgs","repos_url":"https://api.github.com/users/Brett-Gladman/repos","events_url":"https://api.github.com/users/Brett-Gladman/events{/privacy}","received_events_url":"https://api.github.com/users/Brett-Gladman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-03-30T01:40:45Z","updated_at":"2017-05-03T12:21:03Z","closed_at":null,"body":"When using DeployChanges with the Firebird database, I've found that the engine attempts to create the SchemaVersions table after each script.\r\nIt appears that it always fails to find SchemaVersions as an existing table.\r\n\r\nI tracked down the issue to the FirebirdTableJournal within the VerifyTableExistsCommand method.\r\n\r\nIt is currently using :\r\n\r\n\"select 1 from RDB$RELATIONS where RDB$SYSTEM_FLAG = 0 and RDB$RELATION_NAME = '{0}'\" \r\n\r\nto determine the existence of a table.\r\n\r\nFirebird 3 (and I suspect 2.5) force RDB$RELATIONS.RDB$RELATION_NAME to uppercase, so a lower case tableName passed through always fails.\r\n\r\nI found this change to work:\r\n\r\n\"SELECT DISTINCT 1 FROM RDB$RELATIONS WHERE RDB$SYSTEM_FLAG = 0 AND UPPER(RDB$RELATION_NAME) = UPPER('{0}')\"\r\n"},"comment":{"url":"https://api.github.com/repos/DbUp/DbUp/issues/comments/298894991","html_url":"https://github.com/DbUp/DbUp/issues/248#issuecomment-298894991","issue_url":"https://api.github.com/repos/DbUp/DbUp/issues/248","id":298894991,"user":{"login":"Timothyoverton","id":11729026,"avatar_url":"https://avatars3.githubusercontent.com/u/11729026?v=3","gravatar_id":"","url":"https://api.github.com/users/Timothyoverton","html_url":"https://github.com/Timothyoverton","followers_url":"https://api.github.com/users/Timothyoverton/followers","following_url":"https://api.github.com/users/Timothyoverton/following{/other_user}","gists_url":"https://api.github.com/users/Timothyoverton/gists{/gist_id}","starred_url":"https://api.github.com/users/Timothyoverton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Timothyoverton/subscriptions","organizations_url":"https://api.github.com/users/Timothyoverton/orgs","repos_url":"https://api.github.com/users/Timothyoverton/repos","events_url":"https://api.github.com/users/Timothyoverton/events{/privacy}","received_events_url":"https://api.github.com/users/Timothyoverton/received_events","type":"User","site_admin":false},"created_at":"2017-05-03T12:21:03Z","updated_at":"2017-05-03T12:21:03Z","body":"Hey Brett, thanks for the alternate solution - I'll try the same, cheers!"}}
{"actor":{"display_login":"Timothyoverton"}}