# vim: set ft=perl:
use strict;
-use Test::More 'no_plan'; # tests => 1;
+use Test::More;
use SQL::Translator;
use Data::Dumper;
+use Test::SQL::Translator qw(maybe_plan);
+
+BEGIN {
+ maybe_plan(1,
+ 'SQL::Translator::Parser::MySQL',
+ 'SQL::Translator::Producer::PostgreSQL');
+}
my $create = q|
-- unique within a given cv
+COMMENT ON TABLE cvterm IS
+ 'A term, class or concept within an ontology
+ or controlled vocabulary';
+COMMENT ON COLUMN cvterm.cv_id IS
+ 'The cv/ontology/namespace to which this cvterm belongs';
+COMMENT ON COLUMN cvterm.name IS
+ 'A concise human-readable name describing the meaning of the cvterm';
+COMMENT ON COLUMN cvterm.definition IS
+ 'A human-readable text definition';
+COMMENT ON COLUMN cvterm.dbxref_id IS
+ 'A human-readable text definition';
+COMMENT ON INDEX cvterm_c1 IS
+ 'the OBO identifier is globally unique';
+
+
-- ================================================
-- TABLE: cvrelationship
-- ================================================
unique(cvterm_id, termsynonym)
);
-create index cvterm_synonym_idx1 on cvterm_synonym (cvterm_id);
+
+-- The table "cvterm_synonym" doesn't exist, so
+-- creating an index on it screws things up!
+-- create index cvterm_synonym_idx1 on cvterm_synonym (cvterm_id);
-- ================================================
-- TABLE: cvterm_dbxref
producer => "MySQL"
);
-ok( $tr->translate(\$create), 'Translate PG2My' );
+ok( $tr->translate(\$create), 'Translate PG2My' ) or diag($tr->error);