Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostgreSql: position of not_null attribute in field schema definition #138

Closed
davecaos opened this issue Apr 16, 2015 · 1 comment
Closed
Labels

Comments

@davecaos
Copy link

if we put id in any place distinct of the head list option using postgreSQL, sumo returns an error.

sumo_schema() ->
    sumo:new_schema(?MODULE, [
    sumo:new_field(id       , integer,        [ auto_increment, not_null, id] ), %% Error
    sumo:new_field(user     , integer,        [not_null]),
    sumo:new_field(url      , string ,        [not_null]),
    sumo:new_field(domain   , string ,        [not_null])
    %sumo:new_field(message_id, integer, [index])
  ]).

That code retrives:

CREATE TABLE IF NOT EXISTS "conferl_content" 
("id" NOT NULL  SERIAL , ....

instead of

CREATE TABLE IF NOT EXISTS "conferl_content"
 ("id" SERIAL  NOT NULL , 
 "user" INTEGER  NOT NULL , 
@jfacorro jfacorro changed the title Place of id value in sumo_schema/0 PostgreSql store: position of not_null attribute in field schema definition May 28, 2015
@jfacorro jfacorro changed the title PostgreSql store: position of not_null attribute in field schema definition PostgreSql: position of not_null attribute in field schema definition May 28, 2015
@igaray igaray added the bug label May 28, 2015
elbrujohalcon pushed a commit that referenced this issue Sep 10, 2015
…ot_null

[#138] Add node name to test-shell target
@cabol
Copy link
Contributor

cabol commented Mar 28, 2017

I think this issue was solved already, I'll close it – if the problem persist, let me know to re-open it !!

@cabol cabol closed this as completed Mar 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants