badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

Drop/change the primary key of a table

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #58749
    ashiezsky
    Participant

    I need to change the primary key of a table. Is this possible to do in a migration? If not, what is the best way to recreate the table and copy the rows in a migration?

    Here is the original schema:

    $this->table_prefix . ‘flair_triggers’ => array(
    ‘COLUMNS’ => array(
    ‘flair_id’ => array(‘UINT’, 0),
    ‘trig_name’ => array(‘VCHAR’, ”),
    ‘trig_value’ => array(‘UINT’, 0),
    ),
    ‘PRIMARY_KEY’ => array(‘flair_id’, ‘trig_value’),
    ),

    #58760

    Hi,

    Sorry! We only provide the support for our themes.
    As of your request you need a professional who knows all database stuff.

    Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.