Permalink
Browse files

Switch to timestamptz to work with postgresql-simple-0.2

  • Loading branch information...
1 parent 1aa8e99 commit 8dff39203fe243f192860398ad28df64624d818e @mightybyte committed Aug 5, 2012
Showing with 8 additions and 8 deletions.
  1. +1 −1 snaplet-postgresql-simple.cabal
  2. +7 −7 src/Snap/Snaplet/Auth/Backends/PostgresqlSimple.hs
@@ -41,7 +41,7 @@ Library
configurator >= 0.2 && < 0.3,
MonadCatchIO-transformers >= 0.3 && < 0.4,
mtl >= 2 && < 3,
- postgresql-simple >= 0.1 && < 0.3,
+ postgresql-simple >= 0.2 && < 0.3,
resource-pool-catchio >= 0.2 && < 0.3,
snap >= 0.9 && < 0.10,
text >= 0.11 && < 0.12,
@@ -210,18 +210,18 @@ defAuthTable
, colId = ("uid", "SERIAL PRIMARY KEY")
, colLogin = ("login", "text UNIQUE NOT NULL")
, colPassword = ("password", "text")
- , colActivatedAt = ("activated_at", "timestamp")
- , colSuspendedAt = ("suspended_at", "timestamp")
+ , colActivatedAt = ("activated_at", "timestamptz")
+ , colSuspendedAt = ("suspended_at", "timestamptz")
, colRememberToken = ("remember_token", "text")
, colLoginCount = ("login_count", "integer NOT NULL")
, colFailedLoginCount = ("failed_login_count", "integer NOT NULL")
- , colLockedOutUntil = ("locked_out_until", "timestamp")
- , colCurrentLoginAt = ("current_login_at", "timestamp")
- , colLastLoginAt = ("last_login_at", "timestamp")
+ , colLockedOutUntil = ("locked_out_until", "timestamptz")
+ , colCurrentLoginAt = ("current_login_at", "timestamptz")
+ , colLastLoginAt = ("last_login_at", "timestamptz")
, colCurrentLoginIp = ("current_login_ip", "text")
, colLastLoginIp = ("last_login_ip", "text")
- , colCreatedAt = ("created_at", "timestamp")
- , colUpdatedAt = ("updated_at", "timestamp")
+ , colCreatedAt = ("created_at", "timestamptz")
+ , colUpdatedAt = ("updated_at", "timestamptz")
, rolesTable = "user_roles"
}

2 comments on commit 8dff392

@lpsmith
Contributor
lpsmith commented on 8dff392 Aug 7, 2012

It's not that I'm opposed to the dependency bump, but this change is still compatible with postgresql-simple-0.1, so it isn't strictly necessary.

@mightybyte
Owner

Oh, I didn't realize that. I assumed that "the conversion from timestamp to UTCTime was removed in postgresql-simple-0.2" meant that this change wouldn't work with 0.1.*. I guess there still might be an argument for keeping the more restrictive upper bound. Hmmmmm...not sure what's best here...

Please sign in to comment.