
----------------------------------------------------------------
--
-- Table creation scripts for class repeat_region
--

----------------------------------------------------------------
--
-- Schema
--
alter session set current_schema=rsat;


----------------------------------------------------------------
--
-- Main table - repeat_region
--
CREATE TABLE repeat_region
	(
		id                               	VARCHAR(32)	NOT NULL PRIMARY KEY,
		chrom_position                   	VARCHAR(255),
		chromosome                       	VARCHAR(255),
		contig                           	VARCHAR(255),
		end_pos                          	VARCHAR(255),
		organism                         	VARCHAR(255),
		start_pos                        	VARCHAR(255),
		strand                           	VARCHAR(255),
		taxid                            	VARCHAR(255),
		type                             	VARCHAR(255)
	)
;
GRANT select ON repeat_region TO amaze;

----------------------------------------------------------------
--
-- Multivalue field - repeat_region_locus_tag
--
CREATE TABLE repeat_region_locus_tag
	(
		id                               	VARCHAR(32)	NOT NULL,
		locus_tag                        	VARCHAR(255)
	)
;
CREATE INDEX repeat_region_locus_tag_id_index ON repeat_region_locus_tag (id);
GRANT select ON repeat_region_locus_tag TO amaze;

----------------------------------------------------------------
--
-- Multivalue field - repeat_region_mobile_element
--
CREATE TABLE repeat_region_mobile_element
	(
		id                               	VARCHAR(32)	NOT NULL,
		mobile_element                   	VARCHAR(255)
	)
;
CREATE INDEX repeat_region_mobile_element_id_index ON repeat_region_mobile_element (id);
GRANT select ON repeat_region_mobile_element TO amaze;

----------------------------------------------------------------
--
-- Multivalue field - repeat_region_old_locus_tag
--
CREATE TABLE repeat_region_old_locus_tag
	(
		id                               	VARCHAR(32)	NOT NULL,
		old_locus_tag                    	VARCHAR(255)
	)
;
CREATE INDEX repeat_region_old_locus_tag_id_index ON repeat_region_old_locus_tag (id);
GRANT select ON repeat_region_old_locus_tag TO amaze;

----------------------------------------------------------------
--
-- Multivalue field - repeat_region_rpt_family
--
CREATE TABLE repeat_region_rpt_family
	(
		id                               	VARCHAR(32)	NOT NULL,
		rpt_family                       	VARCHAR(255)
	)
;
CREATE INDEX repeat_region_rpt_family_id_index ON repeat_region_rpt_family (id);
GRANT select ON repeat_region_rpt_family TO amaze;

----------------------------------------------------------------
--
-- Multivalue field - repeat_region_rpt_type
--
CREATE TABLE repeat_region_rpt_type
	(
		id                               	VARCHAR(32)	NOT NULL,
		rpt_type                         	VARCHAR(255)
	)
;
CREATE INDEX repeat_region_rpt_type_id_index ON repeat_region_rpt_type (id);
GRANT select ON repeat_region_rpt_type TO amaze;

----------------------------------------------------------------
--
-- Multivalue field - repeat_region_rpt_unit_seq
--
CREATE TABLE repeat_region_rpt_unit_seq
	(
		id                               	VARCHAR(32)	NOT NULL,
		rpt_unit_seq                     	VARCHAR(255)
	)
;
CREATE INDEX repeat_region_rpt_unit_seq_id_index ON repeat_region_rpt_unit_seq (id);
GRANT select ON repeat_region_rpt_unit_seq TO amaze;

----------------------------------------------------------------
--
-- Multivalue field - repeat_region_satellite
--
CREATE TABLE repeat_region_satellite
	(
		id                               	VARCHAR(32)	NOT NULL,
		satellite                        	VARCHAR(255)
	)
;
CREATE INDEX repeat_region_satellite_id_index ON repeat_region_satellite (id);
GRANT select ON repeat_region_satellite TO amaze;

----------------------------------------------------------------
--
-- Quit
--
quit;