|
3 | 3 | [](https://travis-ci.org/iamcal/SQLParser) |
4 | 4 | [](https://coveralls.io/github/iamcal/SQLParser?branch=master) |
5 | 5 |
|
6 | | -This library was created to parse multiple `CREATE TABLE` schemas and compare them, so |
7 | | -figure out what needs to be done to migrate one to the other. |
8 | | - |
9 | | -This is based on the system used at b3ta, Flickr and then Tiny Speck to check the differences |
10 | | -between production and development databases and between shard instances. The original system |
11 | | -just showed a diff (see [SchemaDiff](https://github.com/iamcal/SchemaDiff)), but that was a bit |
12 | | -of a pain. |
| 6 | +This library takes MySQL `CREATE TABLE` statements and returns a data structure representing the table that it defines. |
| 7 | +MySQL syntax [version 5.7](https://dev.mysql.com/doc/refman/5.7/en/create-table.html) is supported. |
| 8 | +This library does not try to validate input - the goal is to deconstruct valid `CREATE TABLE` statements. |
13 | 9 |
|
14 | 10 |
|
15 | 11 | ## Installation |
@@ -43,7 +39,16 @@ seconds just to lex the input. This was obviously not a great option. |
43 | 39 | The current implementation uses a hand-written lexer which takes around 140ms to lex the same |
44 | 40 | input and imposes less odd restrictions. This seems to be the way to go. |
45 | 41 |
|
46 | | -Create table syntax: http://dev.mysql.com/doc/refman/5.1/en/create-table.html |
| 42 | + |
| 43 | +## History |
| 44 | + |
| 45 | +This library was created to parse multiple `CREATE TABLE` schemas and compare them, so |
| 46 | +figure out what needs to be done to migrate one to the other. |
| 47 | + |
| 48 | +This is based on the system used at b3ta, Flickr and then Tiny Speck to check the differences |
| 49 | +between production and development databases and between shard instances. The original system |
| 50 | +just showed a diff (see [SchemaDiff](https://github.com/iamcal/SchemaDiff)), but that was a bit |
| 51 | +of a pain. |
47 | 52 |
|
48 | 53 |
|
49 | 54 | ## Unsupported features |
|
0 commit comments