CREATE TABLE `transactions` (
`id` int(11) NOT NULL,
`id_user` int(11)
NOT NULL,
`amount` float NOT NULL DEFAULT '0',
`code` text,
`status`
int(11) NOT NULL DEFAULT '0',
`date` datetime NOT NULL DEFAULT
CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE
`transactions`
ADD PRIMARY KEY (`id`),
ADD KEY `id_user` (`id_user`),
ADD KEY `status` (`status`);
ALTER TABLE `transactions`
MODIFY `id`
int(11) NOT NULL AUTO_INCREMENT;