Clean up the way we specify the CREATE TABLE statement

This commit is contained in:
Chris Johnson 2016-08-12 13:19:46 -04:00
parent 2fc037c81e
commit f6cbf2c4df
1 changed files with 7 additions and 7 deletions

View File

@ -226,13 +226,13 @@ func (db *PGStore) destroy(session *sessions.Session) error {
} }
func (db *PGStore) createSessionsTable() error { func (db *PGStore) createSessionsTable() error {
stmt := "CREATE TABLE IF NOT EXISTS http_sessions (" + stmt := `CREATE TABLE IF NOT EXISTS http_sessions (
"id BIGSERIAL PRIMARY KEY," + id BIGSERIAL PRIMARY KEY,
"key BYTEA," + key BYTEA,
"data BYTEA," + data BYTEA,
"created_on TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP," + created_on TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,
"modified_on TIMESTAMPTZ," + modified_on TIMESTAMPTZ,
"expires_on TIMESTAMPTZ);" expires_on TIMESTAMPTZ);`
_, err := db.DbPool.Exec(stmt) _, err := db.DbPool.Exec(stmt)
if err != nil { if err != nil {