Compatibility issues with PostgreSql?
I can't seem to get wind to play nice with postgres. On the /post/new page the hidden "id" field remains unfilled (null) and so when I click submit, it tries to create a record without a primary key (and fails and throws a 500 error). Any advice on this?
**I'm on PostgreSQL 8.3.
Realy exists a issue when connects in Postgres. The problem is on set_schema of post model, Sequel schema don't translate columns types to Postgres.
I will work to solve this, but if you discover a solution, please, pull request.
+1
I think that is the mapping of models (set_schema). Some sequel references uses "String :title" instead of "varchar :title", as is in Wind.
And about primary key on Postgress, I found this:
primary_key The primary key for the class. Sequel can determine this automatically for many databases, but not all, so you may need to set it manually. If not determined automatically, the default is :id.
http://sequel.rubyforge.org/rdoc/classes/Sequel/Model/ClassMethods.html
https://gist.github.com/3282515
I tried:
set_schema do
integer :id
String :title
String :text
datetime :date
String :link
set_primary_key :id
end
but it didn't work.
With:
set_schema do
primary_key :id
Sequel generates a integer column with primary key constraint?
My schema was like that before it didnt work. Did you see the gist? set_schema do primary_key :id String :title String :text datetime :date String :link end
When I do ;heroku log':
2012-08-07T06:46:04+00:00 app[web.1]: Sequel::DatabaseError - PG::Error: ERROR: invalid input syntax for integer: ""
I'm getting this at each shot.