We announce the release of FolioPress Pro Hurry up ! and get 20% discount with this coupon code foliopress20%offBuy it Now

Drop/change the primary key of a table

This topic contains 1 reply, has 2 voices, and was last updated by  Theme Horse Support Team 1 month ago.

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.