#!/bin/sh db="/usr/local/bin/mysql -u root" $db > /dev/null 2> /dev/null << ALL_DONE use sso; drop table GameObject; drop table GameObject_Contents; drop table GameObject_Effects; drop table GameObject_Actions; drop table GameObject_Resistances; ALL_DONE $db << ALL_DONE USE sso; create table GameObject ( id integer not null, name varchar(64), description text, flags integer, location_id integer, graphic_id integer, facing integer, index (id), unique (id) ); show columns from GameObject; show index from GameObject; create table GameObject_Contents ( container_id integer not null, item_id integer not null, index (container_id), index (item_id) ); show columns from GameObject_Contents; show index from GameObject_Contents; create table GameObject_Effects ( victim_id integer not null, effect_id integer not null, index (victim_id), index (effect_id) ); show columns from GameObject_Effects; show index from GameObject_Effects; create table GameObject_Actions ( gameobject_id integer not null, action varchar(64) not null, index (gameobject_id), index (action) ); show columns from GameObject_Actions; show index from GameObject_Actions; create table GameObject_Resistances ( gameobject_id integer not null, resistance_id integer not null, index (gameobject_id), index (resistance_id) ); show columns from GameObject_Resistances; show index from GameObject_Resistances; ALL_DONE