On Oct 10, 8:44 am, Christian MICHON <[email protected]>
wrote:
> Hi,
>
> I actually used a modified version of sequel command to make a backup
> of a MS SQL database into a H2 database.
>
> Doing so, it seems at the schema creation that the primary key info
> got lost (my bad).
>
> My H2 database is pretty big, and I do not wish to restart the backup yet.
>
> Is there a smart way to alter the table to make any key primary (if
> none has been defined) ?

  DB.alter_table(:table_name){add_primary_key [:column_name]}

Note that that won't set up an autoincrementing column, it just adds
the primary key constraint to the table.  I would backup your H2
database before trying it.

Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sequel-talk?hl=en.

Reply via email to