Skip to content

Commit

Permalink
Database autoincrement bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kiril Kirkov committed Nov 29, 2017
1 parent 4348d81 commit b993d54
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions database.sql
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ CREATE TABLE `orders_clients` (
`for_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE `orders_clients`
ADD PRIMARY KEY (`id`);

ALTER TABLE `orders_clients`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

CREATE TABLE IF NOT EXISTS `products` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`folder` int(10) unsigned DEFAULT NULL COMMENT 'folder with images',
Expand Down Expand Up @@ -254,6 +260,12 @@ CREATE TABLE `bank_accounts` (
`bic` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE `bank_accounts`
ADD PRIMARY KEY (`id`);

ALTER TABLE `bank_accounts`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;

CREATE TABLE IF NOT EXISTS `value_store` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`thekey` varchar(50) NOT NULL,
Expand Down Expand Up @@ -306,6 +318,13 @@ CREATE TABLE `confirm_links` (
`for_order` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE `confirm_links`
ADD PRIMARY KEY (`id`);

ALTER TABLE `confirm_links`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;


CREATE TABLE `discount_codes` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`type` varchar(10) NOT NULL,
Expand Down

0 comments on commit b993d54

Please sign in to comment.