# MySQL-Front Dump 1.17 beta

#

# Host: localhost Database: ImageDB

#--------------------------------------------------------

# Server version 3.23.42





#

# Table structure for table 't_ast_elem'

#



CREATE TABLE /*!32312 IF NOT EXISTS*/ t_ast_elem (

  num int(11) ,

  name varchar(15) ,

  mag_h double ,

  slope_g double ,

  mean_anomaly double ,

  arg_peri double ,

  lon_asc_node double ,

  inclination double ,

  eccentricity double ,

  sm_axis double ,

  UNIQUE name (name),

  KEY num (num)

);





#

# Table structure for table 't_ast_ephem'

#



CREATE TABLE /*!32312 IF NOT EXISTS*/ t_ast_ephem (

  name char(15) ,

  num int(10) unsigned ,

  flag int(10) unsigned ,

  jday double ,

  alpha double ,

  delta double ,

  alpha_string char(9) ,

  delta_string char(10) ,

  mag double ,

  phase double ,

  elong double ,

  dist_helio double ,

  dist_geo double ,

  azimut double ,

  height double ,

  speed double ,

  dailymove double ,

  airmass double ,

  KEY num (num,flag,jday,alpha,delta),

  KEY name (name)

);





#

# Table structure for table 't_ast_epoch'

#



CREATE TABLE /*!32312 IF NOT EXISTS*/ t_ast_epoch (

  dttm char(8) NOT NULL DEFAULT '' ,

  PRIMARY KEY (dttm)

);





#

# Table structure for table 't_ast_locate'

#



CREATE TABLE /*!32312 IF NOT EXISTS*/ t_ast_locate (

  name char(15) ,

  jday double ,

  alpha double ,

  delta double ,

  mag double ,

  KEY num (jday,alpha,delta),

  KEY name (name)

);





#

# Table structure for table 't_favorites'

#



CREATE TABLE /*!32312 IF NOT EXISTS*/ t_favorites (

  unique_id int(11) NOT NULL auto_increment,

  obj_ra double ,

  obj_dec double ,

  obj_name char(50) ,

  obj_type char(50) ,

  obj_mag double ,

  obj_rise double ,

  obj_set double ,

  obj_transit double ,

  obj_azim double ,

  obj_height double ,

  obj_airmass double ,

  obj_visible char(1) DEFAULT 'N' ,

  obj_status smallint(6) DEFAULT '0' ,

  created_dttm datetime ,

  PRIMARY KEY (unique_id),

  UNIQUE unique_id (unique_id),

  KEY obj_ra (obj_ra,obj_dec),

  KEY obj_visible (obj_visible),

  KEY obj_status (obj_status)

);





#

# Table structure for table 't_image_hdr'

#



CREATE TABLE /*!32312 IF NOT EXISTS*/ t_image_hdr (

  unique_id int(11) NOT NULL auto_increment,

  my_key_id int(11) NOT NULL DEFAULT '0' ,

  file_name char(255) NOT NULL DEFAULT '' ,

  ref char(1) ,

  sx int(11) ,

  sy int(11) ,

  alpha double NOT NULL DEFAULT '0' ,

  delta double NOT NULL DEFAULT '0' ,

  alpha_str char(9) NOT NULL DEFAULT '' ,

  delta_str char(10) NOT NULL DEFAULT '' ,

  dttm datetime ,

  thres_min int(11) ,

  thres_max int(11) ,

  exposure double ,

  binning_x int(11) ,

  binning_y int(11) ,

  mirror_x char(1) ,

  mirror_y char(1) ,

  telescope char(80) ,

  observer char(80) ,

  camera char(80) ,

  filtre char(80) ,

  observatory char(80) ,

  focal_length double ,

  pix_x double ,

  pix_y double ,

  comments1 char(80) ,

  comments2 char(80) ,

  comments3 char(80) ,

  comments4 char(80) ,

  diameter double ,

  temp_ccd double ,

  orientation_ccd double ,

  seeing double ,

  timestamp datetime ,

  sampling double ,

  fov_x double ,

  fov_y double ,

  KEY unique_id (unique_id),

  KEY my_id (my_key_id),

  KEY my_filename (file_name),

  KEY my_position (alpha,delta),

  KEY my_dttm_ref (dttm,ref)

);





#

# Table structure for table 't_image_idx'

#



CREATE TABLE /*!32312 IF NOT EXISTS*/ t_image_idx (

  my_key_id int(11) NOT NULL auto_increment,

  object_name char(20) ,

  object_type char(20) ,

  tag char(20) ,

  kind char(1) ,

  timestamp datetime ,

  UNIQUE my_id (my_key_id),

  KEY my_descr (object_name,object_type,tag,kind)

);





#

# Table structure for table 't_objectlist'

#



CREATE TABLE /*!32312 IF NOT EXISTS*/ t_objectlist (

  unique_id int(11) NOT NULL auto_increment,

  obj_ra double ,

  obj_dec double ,

  obj_name char(50) ,

  obj_type char(50) ,

  obj_mag double ,

  obj_rise double ,

  obj_set double ,

  obj_transit double ,

  obj_azim double ,

  obj_height double ,

  obj_airmass double ,

  obj_visible char(1) DEFAULT 'N' ,

  obj_status smallint(6) DEFAULT '0' ,

  obj_catalog char(10) ,

  PRIMARY KEY (unique_id),

  UNIQUE unique_id (unique_id),

  KEY obj_ra (obj_ra,obj_dec),

  KEY obj_visible (obj_visible),

  KEY obj_status (obj_status)

);





#

# Table structure for table 't_scheduler'

#



CREATE TABLE /*!32312 IF NOT EXISTS*/ t_scheduler (

  unique_id int(11) NOT NULL auto_increment,

  group_id int(11) NOT NULL DEFAULT '0' ,

  seq int(11) NOT NULL DEFAULT '0' ,

  sort_key int(11) NOT NULL DEFAULT '0' ,

  line char(255) ,

  linenum int(11) ,

  obj char(20) ,

  com char(20) ,

  obj_ra double DEFAULT '0' ,

  obj_dec double DEFAULT '0' ,

  obj_name char(50) ,

  obj_type char(50) ,

  obj_mag double ,

  obj_rise double DEFAULT '0' ,

  obj_set double DEFAULT '0' ,

  obj_transit double DEFAULT '0' ,

  obj_azim double DEFAULT '0' ,

  obj_height double DEFAULT '0' ,

  obj_airmass double DEFAULT '0' ,

  obj_visible char(1) DEFAULT 'N' ,

  ccd_exposure double DEFAULT '0' ,

  ccd_binning int(11) DEFAULT '0' ,

  ccd_nbr_exp int(11) DEFAULT '0' ,

  ccd_x1 int(11) DEFAULT '0' ,

  ccd_y1 int(11) DEFAULT '0' ,

  ccd_x2 int(11) DEFAULT '0' ,

  ccd_y2 int(11) DEFAULT '0' ,

  ccd_filter char(10) DEFAULT '0' ,

  ccd_img_path char(255) ,

  ccd_img_name char(25) ,

  obj_status int(11) DEFAULT '0' ,

  comflag char(1) DEFAULT 'N' ,

  wait_time double DEFAULT '0' ,

  exec char(255) ,

  PRIMARY KEY (unique_id),

  UNIQUE unique_id (unique_id),

  KEY obj_ra (obj_ra,obj_dec),

  KEY obj_visible (obj_visible),

  KEY obj_name (obj_name),

  KEY obj_status (obj_status),

  KEY comflag (comflag)

);





#

# Table structure for table 't_scheduler_session'

#



CREATE TABLE /*!32312 IF NOT EXISTS*/ t_scheduler_session (

  unique_id int(11) NOT NULL auto_increment,

  obj_ra double ,

  obj_dec double ,

  obj_name char(50) ,

  obj_type char(50) ,

  obj_mag double ,

  PRIMARY KEY (unique_id),

  UNIQUE unique_id (unique_id),

  KEY obj_ra (obj_ra,obj_dec),

  KEY obj_name (obj_name)

);

