USE `galaxy`;

DROP TABLE `galaxy_object` ;

CREATE TABLE `galaxy_object` (
  `key` INT NOT NULL AUTO_INCREMENT,
  `create` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update` TIMESTAMP NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `owner` INT NULL,
  `name` VARCHAR(50) NULL,
  `gender` ENUM ('', 'M', 'F') NOT NULL DEFAULT '',
  `age` INT NULL,
  `level` INT NULL,
  `location` VARCHAR(50) NULL,
  `area` VARCHAR(50) NULL,
  `x` FLOAT NULL,
  `y` FLOAT NULL,
  `z` FLOAT NULL,
  `action` ENUM ('' , 'MOVE', 'USE', 'DROP', 'TAKE') NOT NULL DEFAULT '',
  `target` INT NULL,
  `card` MEDIUMTEXT NULL,
  PRIMARY KEY (`key`),
  KEY (`owner`),
  KEY (`area`),
  KEY (`name`)
);
