forked from xnuinside/simple-ddl-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ARCHIVE_CHANGELOG.txt
290 lines (211 loc) · 12.3 KB
/
ARCHIVE_CHANGELOG.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
**v0.22.0**
### New Features:
## BigQuery:
I started to add partial support for BigQuery
1. Added support for OPTIONS in CREATE SCHEMA statement
## MSSQL:
1. Added support for PRIMARY KEY CLUSTERED - full details about clusterisation are parsed now in separate key 'clustered_primary_key'.
I don't like that but when I started I did not thought about all those details, so in version 1.0.* I will work on more beautiful and logically output structure.
https://github.com/xnuinside/simple-ddl-parser/issues/91
Pay attention: previously they parsed somehow, but in incorrect structure.
### Improvements:
1. Strings in double quotes moved as separate token from ID to fix a lot of issues with strings with spaces inside
2. Now parser can parse statements separated by new line also (without GO or ; at the end of statement) - https://github.com/xnuinside/simple-ddl-parser/issues/90
### Fixes:
1. Now open strings is not valid in checks (previously the was parsed.) Open string sample 'some string (exist open quote, but there is no close quote)
2. Order like ASC, DESK in primary keys now parsed valid (not as previously as column name)
**v0.21.2**
Fixies:
1. remove 'PERIOD' from tokens
**v0.21.1**
Fixies:
1. START WITH, INCREMENT BY and CACHE (without value) in sequences now is parsed correctly.
**v0.21.0**
### New Features:
## MSSQL:
1. Added support for statements:
1. PERIOD FOR SYSTEM_TIME in CREATE TABLE statement
2. ON [PRIMARY] after CREATE TABLE statement (sample in test files test_mssql_specific.py)
3. WITH statement for TABLE properties
4. TEXTIMAGE_ON statement
5. DEFAULT NEXT VALUE FOR in COLUMN DEFAULT
2. Added support for separating tables DDL by 'GO' statement as in output of MSSQL
3. Added support for CREATE TYPE as TABLE
**v0.20.0**
### New Features:
#### Common
1. SET statements from DDL scripts now collected as type 'ddl_properties' (if you use group_by_type=True) and parsed as
dicts with 2 keys inside {'name': 'property name', 'value': 'property value'}
#### MySQL
2. Added support for MySQL ON UPDATE statements in column (without REFERENCE)
#### MSSQL
3. Added support for CONSTRAINT [CLUSTERED]... PRIMARY KEY for Table definition
4. Added support for WITH statement in CONSTRAINT (Table definition)
**v0.19.9**
1. Fixed issue with the weird log - https://github.com/xnuinside/simple-ddl-parser/issues/78.
**v0.19.8**
Features:
1. Method `DDLParser(...).run(...)` now get argument json=True if you want to get result as json,
but not as Python Object
Fixes:
1. Fixed issue when variables are 'glue' during Struct parse like previously STRUCT<a ARRAY<STRING>,b BOOL> was
extracted like 'STRUCT <aARRAY <STRING>,bBOOL>', now this issue was fixed and it parsed as is STRUCT < a
ARRAY < STRING > ,b BOOL >. Now '>' and '<' always will be with space near them.
2. CHECK CONSTRAINT with functions. Fix for https://github.com/xnuinside/simple-ddl-parser/issues/76.
**v0.19.7**
Fixes:
1. Add support for more special symbols to strings - https://github.com/xnuinside/simple-ddl-parser/issues/68
Features:
1. Added support for HQL statements:
STORED AS INPUTFORMAT, OUTPUTFORMAT - https://github.com/xnuinside/simple-ddl-parser/issues/69
SKEWED BY
**v0.19.6**
Fixes:
1. Fixed issue with PARTITIONED BY multiple columns in HQL - https://github.com/xnuinside/simple-ddl-parser/issues/66
2. Question symbol '?' now handled valid in strings - https://github.com/xnuinside/simple-ddl-parser/issues/64
3. Fixed issue with escaping symbols & added tests -https://github.com/xnuinside/simple-ddl-parser/issues/63
Features:
1. Added support for HQL statement TBLPROPERTIES - https://github.com/xnuinside/simple-ddl-parser/issues/65
**v0.19.5**
Fixes:
1. Fixed issues with COMMENT statement in column definitions. Add bunch of tests, now they expect working ok.
**v0.19.4**
1. Added support for PARTITION BY (previously was only PARTITIONED BY from HQL)
**v0.19.2**
1. Added support for ` quotes in column & tables names
**v0.19.1**
Fixes:
1. Issue with '\t' reported in https://github.com/xnuinside/simple-ddl-parser/issues/53
Features:
1. Added base for future BigQuery support: added output_mode="bigquery". Pay attention that there is no schemas in BigQuery, so schemas are Datasets.
**v0.19.0**
**Features**
1. Added support for base Snowflake SQL Dialect.
Added new --output-mode='snowflake' (add "clone" key)
Added support for CREATE .. CLONE with same behaviour as CREATE .. LIKE
Added support for CREATE .. CLONE for schemas and database - displayed in output as {"clone": {"from": ... }}
CREATE TABLE .. CLUSTER BY ..
CONSTRAINT .. [NOT] ENFORCED (value stored in 'primary_key_enforced')
2. in CREATE DATABASE properties that goes after name like key=value now parsed valid. Check examples in tests
3. Added support for varchar COLLATE column property
**v0.18.0**
**Features**
1. Added base support for AWS Redshift SQL dialect.
Added support for ENCODE property in column.
Added new --output-mode='redshift' that add to column 'encrypt' property by default.
Also add table properties: distkeys, sortkey, diststyle, encode (table level encode), temp.
Supported Redshift statements: SORTKEY, DISTSTYLE, DISTKEY, ENCODE
CREATE TEMP / TEMPORARY TABLE
syntax like with LIKE statement:
create temp table tempevent(like event);
**v0.17.0**
1. All dependencies were updated for the latest version.
2. Added base support for CREATE [BIGFILE | SMALLFILE] [TEMPORARY] TABLESPACE
3. Added support for create table properties like `TABLESPACE user_data ENABLE STORAGE IN ROW CHUNK 8K RETENTION CACHE`
4. Added support for CREATE DATABASE statement
**v0.16.3**
1. Fixed issue then using columns names equals some tokens like, for example, `key` caused the error.
But still words 'foreign' and 'constraint' as column names cause the empty result. I hope they rarely used.
Will be fixed in next releases.
**v0.16.2**
1. Fixed issue with enum in lowercase
**v0.16.0**
1. Fixed the issue when NULL column after DEFAULT used as default value.
2. Added support for generated columns, statatements: AS , GENERATED ALWAYS, STORED in Column definitions, in output it placed to key 'generated'. Keyword 'generated' showed only if column is generated.
3. Half of changelogs moved to ARCHIVE_CHANGELOG.txt
4. Added base support for CREATE DOMAIN statement
5. Added base support for CREATE SCHEMA [IF NOT EXISTS] ... [AUTHORIZATION] statement, added new type keyword 'schemas'
**v0.15.0**
1. Garbage like '‘’' quotes are ignored now and changed to normal.
2. Added support for HQL: LINES TERMINATED BY, COMMENT (for table), ROW FORMAT SERDE, WITH SERDEPROPERTIES (
"input.regex" = "..some regex..")
3. Fixed issue when primary key with default option was not parsed correct - https://github.com/xnuinside/simple-ddl-parser/issues/40
4. Fixed issue when expression in default value was not parsed correct - https://github.com/xnuinside/simple-ddl-parser/issues/39
5. Added support for comments in Columns (except one case when COMMENT goes after DEFAULT word, in this case does not parse correct now - will be fixed in next releases)
**v0.14.0**
1. Added support for CONSTRAINT ... PRIMARY KEY ...
2. Added support for ENCRYPT [+ NO SALT, SALT, USING] statements for Oracle dialect. All default values taken from this doc https://docs.oracle.com/en/database/oracle/oracle-database/21/asoag/encrypting-columns-tables2.html
Now if you use output_mode='oracle' in column will be showed new property 'encrypt'.
If no ENCRYPT statement will be in table definition - then value will be 'None', but if ENCRYPT exists when in encrypt property you will find this information:
{'encrypt' : {
'salt': True,
'encryption_algorithm': 'AES192',
'integrity_algorithm': 'SHA-1'
}}
3. Added support for oracle STORAGE statement, 'oracle' output_mode now has key 'storage' in table data definition.
4. Added support for TABLESPACE statement after columns definition
**v0.12.1**
1. () after DEFAULT now does not cause an issue
2. ' and " does not lost now in DEFAULT values
**v0.12.0**
1. Added support for MSSQL: types with 2 words like 'int IDENTITY',
FOREIGN KEY REFERENCES statement, supported 'max' as type size, CONSTRAINT ... UNIQUE statement in table definition,
CONSTRAINT ... CHECK, CONSTRAINT ... FOREIGN KEY
2. Added output_mode types: 'mysql', 'mssql' for SQL Server, 'oracle'. If chose one of the above -
added key 'constraints' in table definition by default. 'constraints' contain dict with keys 'uniques', 'checks', 'references'
it this is a COSTRAINT .. CHECK 'checks' key will be still in data output, but it will be duplicated to 'constraints': {'checks': ...}
3. Added support for ALTER ADD ... UNIQUE
4. Added support for CREATE CLUSTERED INDEX, if output_mode = 'mssql' then index will have additional arg 'clustered'.
5. Added support for DESC & NULLS in CREATE INDEX statements. Detailed information places in key 'detailed_columns' in 'indexes', example: '
'index': [{'clustered': False,
'columns': ['extra_funds'],
'detailed_columns': [{'name': 'extra_funds',
'nulls': 'LAST',
'order': 'ASC'}],
6. Added support for statement ALTER TABLE ... ADD CONSTRAINT ... DEFAULT ... FOR ... ;
**v0.11.0**
1. Now table can has name 'table'
2. Added base support for statement CREATE TYPE: AS ENUM, AS OBJECT, INTERNALLENGTH, INPUT, OUTPUT (not all properties & types supported yet.)
3. Added argument 'group_by_type' in 'run' method that will group output by type of parsed entities like:
'tables': [all_pasrsed_tables], 'sequences': [all_pasrsed_sequences], 'types': [all_pasrsed_types], 'domains': [all_pasrsed_domains]
4. Type in column definition also can be "schema"."YourCustomType"
5. " now are not disappeared if you use them in DDL.
**v0.10.2**
1. Fix regex that find '--' in table names (to avoid issue with -- comment lines near string defaults)
**v0.10.1**
1. Added support for CREATE TABLE ... LIKE statement
2. Add support for DEFERRABLE INITIALLY, NOT DEFERRABLE statements
**v0.9.0**
1. Added support for REFERENCES without field name, like `product_no integer REFERENCES products ON DELETE RESTRICT`
2. Added support for REFERENCES ON statement
**v0.8.1**
1. Added support for HQL Structured types like ARRAY < STRUCT <street: STRING, city: STRING, country: STRING >>,
MAP < STRING, STRUCT < year: INT, place: STRING, details: STRING >>,
STRUCT < street_address: STRUCT <street_number: INT, street_name: STRING, street_type: STRING>, country: STRING, postal_code: STRING >
**v0.8.0**
1. To DDLParser's run method was added 'output_mode' argument that expect valur 'hql' or 'sql' (by default).
Mode change result output. For example, in hql exists statement EXTERNAL. If you want to see in table information
is it EXTERNAL table or not - you need to set 'hql' output_mode.
2. Added support for hql EXTERNAL statement, STORED AS statement, LOCATION statement
3. Added support for PARTITIONED BY statement (for both hql & sql)
4. Added support for HQL ROW FORMAT statement, FIELDS TERMINATED BY statement, COLLECTION ITEMS TERMINATED BY statement, MAP KEYS TERMINATED BY statement
**v0.7.4**
1. Fix behaviour with -- in strings. Allow calid table name like 'table--name'
**v0.7.3**
1. Added support `/* ... */` block comments
2. Added support for Mysql '#' comments
**v0.7.1**
1. Ignore inline with '--' comments
**v0.7.0**
1. Redone logic of parse CREATE TABLE statements, now they parsed as one statement (not line by line as previous)
2. Fixed several minor bugs with edge cases in default values and checks
3. Added support for ALTER FOREIGN KEY statement for several fields in one statement
**v0.6.1**
1. Fix minor bug with schema in index statements
**v0.6.0**
1. Added support for SEQUENCE statemensts
2. Added support for ARRAYs in types
3. Added support for CREATE INDEX statements
**v0.5.0**
1. Added support for UNIQUE column attribute
2. Add command line arg to pass folder with ddls (parse multiple files)
3. Added support for CHECK Constratint
4. Added support for FOREIGN Constratint in ALTER TABLE
**v0.4.0**
1. Added support schema for table in REFERENCES statement in column definition
2. Added base support for Alter table statements (added 'alters' key in table)
3. Added command line arg to pass path to get the output results
4. Fixed incorrect null fields parsing
**v0.3.0**
1. Added support for REFERENCES statement in column definition
2. Added command line