Giter Club home page Giter Club logo

Comments (7)

19WAS85 avatar 19WAS85 commented on August 16, 2024

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.

from wind.

richardsondx avatar richardsondx commented on August 16, 2024

+1

from wind.

19WAS85 avatar 19WAS85 commented on August 16, 2024

I think that is the mapping of models (set_schema). Some sequel references uses "String :title" instead of "varchar :title", as is in Wind.

from wind.

19WAS85 avatar 19WAS85 commented on August 16, 2024

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

from wind.

richardsondx avatar richardsondx commented on August 16, 2024

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.

from wind.

19WAS85 avatar 19WAS85 commented on August 16, 2024

With:

set_schema do
    primary_key :id

Sequel generates a integer column with primary key constraint?

from wind.

richardsondx avatar richardsondx commented on August 16, 2024

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.

from wind.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.