CREATE TABLE `associations` (
  `id` int(11) NOT NULL,
  `assoc_name` varchar(200) NOT NULL,
  `person_name` varchar(200) NOT NULL,
  `email` varchar(200) NOT NULL,
  `mobile` varchar(30) NOT NULL,
  `phone` varchar(30) DEFAULT NULL,
  `password` varchar(300) NOT NULL,
  `users_no` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

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

CREATE TABLE `queries_suggestions` (
  `id` int(11) NOT NULL,
  `person_name` varchar(300) NOT NULL,
  `mobile` varchar(30) NOT NULL,
  `email` varchar(300) NOT NULL,
  `sugg_text` text NOT NULL,
  `replay` text DEFAULT NULL,
  `status` tinyint(1) NOT NULL COMMENT '0= not replay\r\n1= replay',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

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


ALTER TABLE `settings`
  ADD COLUMN `sender_email` VARCHAR(50) NULL;

ALTER TABLE `settings`
  ADD COLUMN `sender_mail_name` VARCHAR(50) NULL DEFAULT NULL AFTER `sender_email`;