initialize-1.3.sql 1.9 KB

1234567891011121314151617181920212223242526272829303132
  1. /* For load_gff3.pl */
  2. insert into contact (name,description) values ('null','null');
  3. insert into cv (name) values ('null');
  4. insert into cv (name,definition) values ('local','Locally created terms');
  5. insert into cv (name,definition) values ('Statistical Terms','Locally created terms for statistics');
  6. insert into db (name, description) values ('null', 'Use when a database is not available.');
  7. insert into dbxref (db_id,accession) values ((select db_id from db where name='null'), 'local:null');
  8. insert into cvterm (name,cv_id,dbxref_id) values ('null',(select cv_id from cv where name = 'null'),(select dbxref_id from dbxref where accession='local:null'));
  9. insert into pub (miniref,uniquename,type_id) values ('null','null',(select cvterm_id from cvterm where name = 'null'));
  10. insert into cv (name,definition) values ('chado_properties','Terms that are used in the chadoprop table to describe the state of the database');
  11. insert into dbxref (db_id,accession) values ((select db_id from db where name='null'), 'chado_properties:version');
  12. insert into cvterm (name,definition,cv_id,dbxref_id) values ('version','Chado schema version',(select cv_id from cv where name = 'chado_properties'),(select dbxref_id from dbxref where accession='chado_properties:version'));
  13. --this table will probably end up in general.sql
  14. CREATE TABLE public.materialized_view (
  15. materialized_view_id SERIAL,
  16. last_update TIMESTAMP,
  17. refresh_time INT,
  18. name VARCHAR(64) UNIQUE,
  19. mv_schema VARCHAR(64),
  20. mv_table VARCHAR(128),
  21. mv_specs TEXT,
  22. indexed TEXT,
  23. query TEXT,
  24. special_index TEXT
  25. );