
----------------------------------------------------------------
--
-- 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_exons
--
CREATE TABLE repeat_region_exons
	(
		id                               	VARCHAR(32)	NOT NULL,
		exons                            	VARCHAR(255)
	)
;
CREATE INDEX repeat_region_exons_id_index ON repeat_region_exons (id);
GRANT select ON repeat_region_exons TO amaze;

----------------------------------------------------------------
--
-- Multivalue field - repeat_region_introns
--
CREATE TABLE repeat_region_introns
	(
		id                               	VARCHAR(32)	NOT NULL,
		introns                          	VARCHAR(255)
	)
;
CREATE INDEX repeat_region_introns_id_index ON repeat_region_introns (id);
GRANT select ON repeat_region_introns 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_note
--
CREATE TABLE repeat_region_note
	(
		id                               	VARCHAR(32)	NOT NULL,
		note                             	VARCHAR(255)
	)
;
CREATE INDEX repeat_region_note_id_index ON repeat_region_note (id);
GRANT select ON repeat_region_note TO amaze;

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