You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Support MySQL issue 148 DDL samples
* Return DROP TABLE IF EXISTS in output
* Format parser changes
* Fix parser regressions and stabilize MySQL issue 148 support
- Apply these instructions only within this repository.
5
+
- Prefer small, focused changes.
6
+
7
+
## Workflow
8
+
- Check git status before and after changes.
9
+
- Avoid modifying unrelated files.
10
+
- Do not edit generated files unless explicitly requested.
11
+
- For issue work: pull latest `main`, add a repro test first, then fix the issue, run tests to confirm, regenerate `parsetab` as needed, and push to an issue-named branch on `origin`.
12
+
- When adding support for new statements, dialect features, or output fields, update user-facing docs (`README.md`) and the active `CHANGELOG.md` entry in the same change.
13
+
14
+
## Code Style
15
+
- Keep edits minimal and consistent with nearby code.
16
+
- Use ASCII only unless the file already uses Unicode and it is required.
17
+
- Add brief comments only when logic is non-obvious.
18
+
19
+
## Tests
20
+
- If changes affect behavior, run targeted tests when practical.
21
+
- Report test commands and results; do not fabricate.
22
+
- Always run linters before committing (ruff and black).
23
+
24
+
## Commits
25
+
- Make clear, imperative commit messages when asked to commit.
26
+
- Do not amend or rewrite history unless explicitly requested.
27
+
- Do not commit changes to `AGENTS.md` unless the user explicitly requested an `AGENTS.md` update.
28
+
- Always run the code before committing so `parsetab` is refreshed, and include its updates in the commit.
29
+
- Always update the changelog for the current version if it is greater than the latest tag. If the current version equals the latest tag, bump the version first, then add changelog entries.
30
+
31
+
## Tags
32
+
- Ignore legacy git tags that start with `v` when deciding changelog/version workflow.
33
+
- Treat `v*` tags as older than plain numeric release tags and do not use them to decide whether the current version is newer than the latest release.
34
+
- For changelog decisions, prefer the active release line in `CHANGELOG.md` over legacy `v*` tags.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ The format is based on Keep a Changelog 1.0.0, and this project adheres to Seman
11
11
- None.
12
12
13
13
### Fixed
14
+
- MySQL dump-style DDL files now parse more reliably: `DROP TABLE IF EXISTS` is supported in parser output and no longer fails in strict mode, inline `/*...*/` comment placeholders inside identifiers are handled, and table-level `KEY` / `UNIQUE KEY` definitions with prefix lengths like `column(32)` are supported. https://github.com/xnuinside/simple-ddl-parser/issues/148
14
15
- MySQL-style `ALTER TABLE ... ADD CONSTRAINT ... FOREIGN KEY constraint_name (...) REFERENCES ...` statements now parse correctly instead of failing on the duplicated foreign key name. `ALTER TABLE ... DROP FOREIGN KEY ...` is also supported, and simple `DROP VIEW` / `CREATE VIEW ... AS ...` statements are now recognized in parser output. https://github.com/xnuinside/simple-ddl-parser/issues/149
15
16
- HQL primitive generic array types like `array<string>` now parse without failing on the closing `>` token. https://github.com/xnuinside/simple-ddl-parser/issues/192
16
17
-`TRUNCATE TABLE schema.table` statements now return the affected table in parser output instead of being skipped. https://github.com/xnuinside/simple-ddl-parser/issues/190
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -436,6 +436,8 @@ In output you will have names like 'dbo' and 'TO_Requests', not '[dbo]' and '[TO
436
436
- AUTO_INCREMENT in column definitions and table properties
437
437
- COLLATE, COMMENT, CHARACTER SET / CHARSET table options
438
438
- INDEX statements in table definitions, including VISIBLE / INVISIBLE indexes
439
+
-`UNIQUE KEY (...)`, named or unnamed `KEY (...)` / `INDEX (...)`, and MySQL index prefix lengths such as `column(32)` inside table definitions
440
+
-`DROP TABLE IF EXISTS` is parsed as a statement in output, and MySQL dump-style inline comments like `/*$wgDBprefix*/table_name` are handled in DDL files
0 commit comments