SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

CREATE DATABASE IF NOT EXISTS `sfs3_signup_example` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `sfs3_signup_example`;

CREATE TABLE `accounts` (
  `id` int(11) NOT NULL,
  `username` varchar(50) NOT NULL,
  `password` varchar(64) NOT NULL,
  `email` varchar(50) NOT NULL,
  `country` varchar(50) NOT NULL,
  `birth_year` int(11) NOT NULL,
  `reg_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `act_code` varchar(40) DEFAULT NULL,
  `active` varchar(1) NOT NULL DEFAULT 'N',
  `zone` varchar(30) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


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


ALTER TABLE `accounts`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
