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

Fixed errors in pgsql creation scripts #216

Closed
wants to merge 1 commit into from
Closed

Fixed errors in pgsql creation scripts #216

wants to merge 1 commit into from

Conversation

nikbyte
Copy link
Member

@nikbyte nikbyte commented Apr 29, 2014

Fixed errors in pgsql creation scripts: for all serials set maxvalue and cycle (because sometimes serials may overflow)

…and cycle (because sometimes serials may overflow)
@bogdan-iancu
Copy link
Member

@nikbyte , are these settings (for the serials) somehow related to a table or ?? as I see no references (in the lines you added) to any table name or so.

Also, changing those file is not the correct way - those files are auto generated based on the DB schema from db/schema . So either we need to change the schema, either the way the files are generated for postgres.

@bogdan-iancu bogdan-iancu self-assigned this Apr 30, 2014
@nikbyte
Copy link
Member Author

nikbyte commented Apr 30, 2014

Okay, I'll try to work with DB schema, but I'm not sure I can do it with schema.
I think we can resolve the problem with bytea field in dialog table (we should not set it's size because it raises error).
But I'm not sure I can set up serial properties from these xml-s.
I'll try to figure it out.

P.S. Serial properties, of course, related to table. For example, if you create table location with id column with type serial, your sequence will be named as location_id_seq. So, you must set location_id_seq properties. All scripts were tested and works okay. Why I have done it? In my system I met problems when counters had a value larger than int (serial) field. In that case we receive errors and no any records can be inserted into table. We must set maximum value as maxint (2147483647) and cycle counters. Another way is to use bigserial (longint) instead of serial (int), but we also must set cycle on counters.

@nikbyte nikbyte closed this May 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants