-- MySQL Workbench Forward Engineering

SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';

-- -----------------------------------------------------
-- Schema eod_authentication
-- -----------------------------------------------------
-- 인증 데이터베이스
-- -----------------------------------------------------
-- Schema eod_game
-- -----------------------------------------------------
-- 게임 데이터베이스
-- -----------------------------------------------------
-- Schema eod_log
-- -----------------------------------------------------
-- 로그 데이터베이스
-- -----------------------------------------------------
-- Schema eod_ranking
-- -----------------------------------------------------
-- 랭킹 데이터베이스

-- -----------------------------------------------------
-- Schema eod_ranking
--
-- 랭킹 데이터베이스
-- -----------------------------------------------------
CREATE SCHEMA IF NOT EXISTS `eod_ranking` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
-- -----------------------------------------------------
-- Schema eod_community
-- -----------------------------------------------------
-- 커뮤니티 데이터베이스
-- -----------------------------------------------------
-- Schema eod_tool
-- -----------------------------------------------------
-- 서비스 관리도구용 데이터베이스
-- -----------------------------------------------------
-- Schema eod_configuration
-- -----------------------------------------------------
-- 서비스 설정 데이터베이스
USE `eod_ranking` ;

-- -----------------------------------------------------
-- Table `eod_ranking`.`table_ranking_personal`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `eod_ranking`.`table_ranking_personal` (
  `user_id` BIGINT(20) UNSIGNED NOT NULL,
  `ranking` INT(11) UNSIGNED NOT NULL,
  `score` INT(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`user_id`, `ranking`))
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `eod_ranking`.`table_ranking_team`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `eod_ranking`.`table_ranking_team` (
  `team_id` BIGINT(20) UNSIGNED NOT NULL,
  `ranking` INT(11) UNSIGNED NOT NULL,
  `score` INT(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`team_id`, `ranking`))
ENGINE = InnoDB;


-- -----------------------------------------------------
-- Table `eod_ranking`.`table_ranking_guild`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `eod_ranking`.`table_ranking_guild` (
  `guild_id` BIGINT(20) UNSIGNED NOT NULL,
  `ranking` INT(11) UNSIGNED NOT NULL,
  `score` INT(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`guild_id`, `ranking`))
ENGINE = InnoDB;


SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
