Created
November 27, 2014 18:26
-
-
Save Kobedinho/09075749739c9657b92f to your computer and use it in GitHub Desktop.
script para agregar campo autoincremental a una tabla existente (multiples campos autonumericos)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// esta funcion se ejecuta mediante un paquete | |
function post_install() | |
{ | |
global $db; | |
$query = "ALTER TABLE table_name MODIFY COLUMN table_column int(11) auto_increment NOT NULL, ADD KEY(table_column);"; | |
$res = $db->query($query); | |
echo "---- Terminando ----"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment