ALTER TABLE `table1` CHANGE `id` `id` bigint NOT NULL AUTO_INCREMENT PRIMARY KEY;
ALTER TABLE `table2` ADD PRIMARY KEY ( `id` );
