Created
November 10, 2018 03:14
-
-
Save bgschiller/4fcd36a0d5baccc97b0befadc0259b84 to your computer and use it in GitHub Desktop.
A line-by-line description of the pain I ran into while trying to deploy a csharp app using codeship
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
run db locally -> sql server doesn't run on ubuntu 12.04 | |
run sql server locally via docker -> codeship basic doesn't permit docker | |
learn enough docker to use codeship pro? maybe, but explore other routes first. | |
run db on RDS. | |
connect to db -> in sql server, port is specified via comma, not colon. | |
connect to db -> ubuntu doesn't have odbc driver for sql server | |
download and install FreeTDS drivers. | |
connect to db -> user not authenticated | |
connect to db locally works. | |
connect to db from build server doesn't work. | |
add TDS_Version=8.0; to connection string -> connection works | |
run tests -> cannote execute drop database inside transaction (but connection.autocommit is True) | |
add a cursor.commit() :shrug: -> cursor.commit() throws an error. | |
wrap in a try/except-pass -> ... seems to work? | |
successfully drop/recreate db, run schema changes. | |
cannot connect via sqlalchemy connection string -> turns out the password must be url-safe :shrug: | |
remove + and = symbols from password. | |
cannote execute drop database inside transaction is back -> "SET IMPLICIT_TRANSACTIONS OFF" | |
that didn't work. removed. | |
start a brand new cursor to drop database. didn't work either | |
commit just before dropping (still with brand new cursor). This worked when ssh'd into the build server. | |
this didn't work as a build script. | |
gonna try to close the connection and re-open. | |
that worked! sometimes. I still need the cursor.commit() first thing. | |
cursor can't find users in the db, but I see them -> needed to "use db_name;" (even though I'm passing it via connection string) | |
the schema is loaded! happy day! | |
somehow I'm getting back datetime2 objects as strings, even though they're turned into datetime.datetimes locally :shrug: | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment