BEGIN;
-CREATE TABLE added02 (
+CREATE TABLE added (
id bigint
);
ALTER TABLE employee DROP COLUMN job_title;
-ALTER TABLE new_name ADD COLUMN new_field02 integer;
+ALTER TABLE new_name ADD COLUMN new_field integer;
-ALTER TABLE person ADD COLUMN is_rock_star02 smallint DEFAULT '1';
+ALTER TABLE person ADD COLUMN is_rock_star smallint DEFAULT '1';
ALTER TABLE person ALTER COLUMN person_id TYPE serial;
-- SQL::Translator::Producer::SQLite cant rename_field;
-CREATE UNIQUE INDEX unique_name_person ON person (name);
+CREATE UNIQUE INDEX unique_name ON person (name);
-CREATE UNIQUE INDEX UC_person_id_person ON person (person_id);
+CREATE UNIQUE INDEX UC_person_id ON person (person_id);
-CREATE UNIQUE INDEX UC_age_name_person ON person (age, name);
+CREATE UNIQUE INDEX UC_age_name ON person (age, name);
DROP TABLE deleted;
physical_description text
);
-CREATE UNIQUE INDEX unique_name_person02 ON person (name);
+CREATE UNIQUE INDEX unique_name02 ON person (name);
-CREATE UNIQUE INDEX UC_person_id_person02 ON person (person_id);
+CREATE UNIQUE INDEX UC_person_id02 ON person (person_id);
-CREATE UNIQUE INDEX UC_age_name_person02 ON person (age, name);
+CREATE UNIQUE INDEX UC_age_name02 ON person (age, name);
INSERT INTO person SELECT person_id, name, age, weight, iq, is_rock_star, physical_description FROM person_temp_alter;
## END OF DIFF
+# Note the 02 in the 3 names above (end of diff) are an implementation
+# quirk - there is nothing to reset the global seen-names register
+# The rewrite should abolish this altogether, and carry the register in
+# the main schema object
# Test for sameness
$out = SQL::Translator::Diff::schema_diff($source_schema, 'MySQL', $source_schema, 'MySQL' );
timest timestamp
);
-CREATE INDEX titleindex_Basic ON Basic (title);
+CREATE INDEX titleindex ON Basic (title);
-CREATE UNIQUE INDEX emailuniqueindex_Basic ON Basic (email);
+CREATE UNIQUE INDEX emailuniqueindex ON Basic (email);
DROP TABLE Another;
another_id int(10) DEFAULT \'2\',
timest timestamp
)',
- 'CREATE INDEX titleindex_Basic02 ON Basic (title)',
- 'CREATE UNIQUE INDEX emailuniqueindex_Basic02 ON Basic (email)',
+ 'CREATE INDEX titleindex ON Basic (title)',
+ 'CREATE UNIQUE INDEX emailuniqueindex ON Basic (email)',
'DROP TABLE Another',
'CREATE TABLE Another (
id INTEGER PRIMARY KEY NOT NULL