text: /* 
   * To change this license header, choose License Headers in Project Properties.
   * To change this template file, choose Tools | Templates
   * and open the template in the editor.
   */
  /**
   * Author:  xach
   * Created: Aug 5, 2018
   */
  
  SET sql_mode = '';
  SET GLOBAL sql_mode='';
  
  DROP DATABASE actions;
  
  
  CREATE DATABASE IF NOT EXISTS actions;
  
  
  
  USE actions;
  
  CREATE TABLE IF NOT EXISTS `users` (
  	`id` int(11) NOT NULL AUTO_INCREMENT,
  	`username` varchar(255) COLLATE utf8_bin NOT NULL,
  	`email` varchar(255) COLLATE utf8_bin NOT NULL,
  	PRIMARY KEY(`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1;
  
  CREATE TABLE IF NOT EXISTS `users_meta` (
  	`id` int(11) NOT NULL AUTO_INCREMENT,
  	`user_id` int(11) NOT NULL,
  	`meta_key` varchar(255) COLLATE utf8_bin NOT NULL,
  	`meta_value` varchar(255) COLLATE utf8_bin NOT NULL,
  	PRIMARY KEY(`id`),
  	FOREIGN KEY (user_id) REFERENCES users(id)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1;
  
  CREATE TABLE IF NOT EXISTS `posts` (
  	`id` int(11) NOT NULL AUTO_INCREMENT,
  	`content` longtext COLLATE utf8_bin NOT NULL,
  	`created_date` datetime NOT NULL,
  	PRIMARY KEY(`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=1;
  
  
  