#154 sqlobject-manager sql (show create-table commands) semicolon

closed-fixed
Oleg Broytman
General (125)
5
2006-05-18
2006-02-01
Daniel Holth
No

Hi, I'm playing with turboblog
(http://svn.turboblog.python-hosting.com/turboblog)
with postgresql as the database. sqlobject-manager will
print my database CREATE TABLE () but it's severely
lacking in ; . This would be okay except for some
reason it does not create the tables correctly in the
normal way.

So I must print the CREATE TABLE commands, add the
necessary semicolons, and run it through psql.

Notice the linkage tables are created with the same
function call as the main table. Then the 'sql' command
of sqlobject-admin (sqlobject/manager/command.py line
495) adds one semicolon for the group.

CREATE TABLE tg_group (
id SERIAL PRIMARY KEY,
child_name VARCHAR(255),
group_id VARCHAR(16) NOT NULL UNIQUE,
display_name VARCHAR(255),
created TIMESTAMP
)
CREATE TABLE tg_user_group (
group_id INT NOT NULL,
user_id INT NOT NULL
)
CREATE TABLE tg_group_permission (
group_id INT NOT NULL,
permission_id INT NOT NULL
);

Discussion

  • Oleg Broytman
    Oleg Broytman
    2006-05-18

    • assigned_to: nobody --> phd
    • status: open --> closed-fixed