Project

General

Profile

  • svn:executable: *

# Date Author Comment
11970 01/20/2014 11:33 AM Aaron Marcuse-Kubitza

moved everything into /trunk/ to create the standard svn layout, for use with tools that require this (eg. git-svn). IMPORTANT: do NOT do an `svn up`. instead, re-use your working copy's existing files with `svn switch` (http://svnbook.red-bean.com/en/1.6/svn.ref.svn.c.switch.html).

10448 07/26/2013 08:16 PM Aaron Marcuse-Kubitza

bin/my2pg: use s!...!...! when either the regexp or the replacement contains / , to avoid unnecessary \-s

10447 07/26/2013 08:09 PM Aaron Marcuse-Kubitza

bin/my2pg: commenting out table options: added explanatory comment, because it is not obvious from the regexp what this does

10445 07/26/2013 06:35 PM Aaron Marcuse-Kubitza

bin/my2pg: comment out table options (http://dev.mysql.com/doc/refman/5.5/en/server-sql-mode.html#sqlmode_no_table_options) instead of removing them, because they include table COMMENTs, which contain important metadata such as table definitions. (note that table COMMENTs use a slightly different syntax than column COMMENTs, so the table COMMENTs will not be commented out twice.)

10444 07/26/2013 06:19 PM Aaron Marcuse-Kubitza

bin/my2pg: comment out COMMENTs instead of removing them so that they will be included in the PostgreSQL translation. COMMENTs contain important metadata about columns, such as definitions and the meanings of integer flag values.

10442 07/26/2013 05:56 PM Aaron Marcuse-Kubitza

bin/my2pg: added instructions for regenerating *.schema.sql whenever this script is changed

10441 07/26/2013 05:22 PM Aaron Marcuse-Kubitza

bin/my2pg: COMMENT: also match COMMENTs with embedded ', because there will only be one COMMENT per line, so the contents of the COMMENT can just extend to the last ' on the line

10439 07/26/2013 04:29 PM Aaron Marcuse-Kubitza

bin/my2pg: replace MySQL ` quotes with " quotes to support exports that were generated without ANSI_QUOTES mode. (this replacement only applies to schema exports, not data.) ANSI_QUOTES is only available with mysqldump --compatible modes that also include NO_TABLE_OPTIONS, which omits important table options such as comments. in particular, these comments are part of schemas/VegCore/VegCore.ERD.mwb but were not being included in VegCore.my.sql.

10237 07/10/2013 08:20 PM Aaron Marcuse-Kubitza

bin/my2pg*: keep MySQL indefinite dates as text strings instead of translating them (to the first of the month or year) to fit into a PostgreSQL timestamp. this allows the application to decide how to handle these values, which otherwise have no corresponding value in PostgreSQL. this requires changing the date/time related types to text instead of leaving them as-is, so that they can store the custom MySQL strings.

10225 07/10/2013 04:51 PM Aaron Marcuse-Kubitza

bin/my2pg: use util.sh $top_dir instead of setting $selfDir

10224 07/10/2013 04:50 PM Aaron Marcuse-Kubitza

bin/my2pg*: use the util.sh sed wrapper, which fixes the LANG=*.UTF-8 "illegal byte sequence" errors on invalid UTF-8

8943 05/09/2013 08:27 AM Aaron Marcuse-Kubitza

bin/my2pg: support $sql_ascii mode, where varbinary is translated to text instead of bytea

8942 05/09/2013 08:27 AM Aaron Marcuse-Kubitza

bin/my2pg: remove any () after text

8938 05/09/2013 08:15 AM Aaron Marcuse-Kubitza

bin/my2pg: unpack custom types set('...')

8932 05/09/2013 07:45 AM Aaron Marcuse-Kubitza

bin/my2pg: translate varbinary to bytea

8259 03/28/2013 08:07 PM Aaron Marcuse-Kubitza

bin/my2pg: Translate inline enum type to CHECK constraint

8003 03/15/2013 10:26 AM Aaron Marcuse-Kubitza

my2pg: Removed SETs for standard_conforming_strings, escape_string_warning because these are also prepended by my2pg.data, which this script's output is piped to

7796 02/28/2013 02:57 PM Aaron Marcuse-Kubitza

my2pg: Replace tinytext, mediumtext with text

7695 02/26/2013 02:36 PM Aaron Marcuse-Kubitza

my2pg: Remove (0) after char

7694 02/26/2013 02:35 PM Aaron Marcuse-Kubitza

my2pg: Remove any (#) after bytea

7693 02/26/2013 02:33 PM Aaron Marcuse-Kubitza

my2pg: Translate binary to bytea

7542 02/14/2013 02:23 AM Aaron Marcuse-Kubitza

my2pg: Use my2pg.data to perform data-only replacements, instead of duplicating them in both my2pg and my2pg.data

7541 02/14/2013 02:01 AM Aaron Marcuse-Kubitza

my2pg: named UNIQUE KEYs: Comment out the name because PostgreSQL requires it to be globally unique, but MySQL only requires it to be unique within the table

7540 02/14/2013 01:53 AM Aaron Marcuse-Kubitza

my2pg: Translate UNIQUE KEYs instead of removing them

7539 02/14/2013 01:49 AM Aaron Marcuse-Kubitza

my2pg*: Removed KEYs: Comment out the definition rather than removing it

7538 02/14/2013 01:45 AM Aaron Marcuse-Kubitza

my2pg*: Remove FOREIGN KEYs because MySQL does not dump tables in dependency order, which prevents PostgreSQL from creating tables whose fkeys refer to a later table

7537 02/14/2013 01:33 AM Aaron Marcuse-Kubitza

my2pg*: Replacing invalid table elements to remove them: Use a dummy CHECK constraint instead of a boolean field to avoid adding fields to the table. The elements can't always simply be removed because sed can't remove the trailing comma of the previous element, and removing the following comma doesn't work for the last element in the table.

7536 02/14/2013 12:11 AM Aaron Marcuse-Kubitza

my2pg*: Replace '0000-00-00 00:00:00' with '-infinity'

7535 02/14/2013 12:04 AM Aaron Marcuse-Kubitza

my2pg: Replace datetime with timestamp

7534 02/13/2013 11:59 PM Aaron Marcuse-Kubitza

my2pg: Remove COLLATE field attribute

6785 12/11/2012 10:00 AM Aaron Marcuse-Kubitza

my2pg: Translate blob to bytea

6784 12/11/2012 09:55 AM Aaron Marcuse-Kubitza

my2pg: Also remove UNIQUE and FULLTEXT inline indexes

6309 11/19/2012 06:22 PM Aaron Marcuse-Kubitza

my2pg: Also remove (#) after bigint

6165 11/14/2012 03:54 PM Aaron Marcuse-Kubitza

my2pg: *int types: Added mediumint

6070 11/08/2012 12:01 PM Aaron Marcuse-Kubitza

my2pg: Also remove column comments. Note that these cannot be translated by sed, because PostgreSQL only allows setting column comments in a separate statement, not inline with the column's entry in the CREATE TABLE statement, and sed can only make replacements contiguous with the input line.

5887 10/30/2012 04:59 PM Aaron Marcuse-Kubitza

my2pg*: Turn off escape_string_warning because \-escaped strings are standard in MySQL

5885 10/30/2012 04:42 PM Aaron Marcuse-Kubitza

my2pg: Also remove any CHARACTER SET modifier on a column definition

4463 09/05/2012 07:00 AM Aaron Marcuse-Kubitza

my2pg: Prepend 'SET standard_conforming_strings = off;' because this defaults to on starting with PostgreSQL 9.1

4455 09/05/2012 05:49 AM Aaron Marcuse-Kubitza

my2pg, my2pg.data: Fixed bug where replacement for '0000-00-00' date needed to be wrapped in single quotes

4430 09/05/2012 01:42 AM Aaron Marcuse-Kubitza

my2pg: Also perform data-only replacements, since default values can contain data-specific replacements. This also allows my2pg to transform a combined schema+data export.

4426 09/05/2012 01:03 AM Aaron Marcuse-Kubitza

Added my2pg