Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit regex for schemas filenames #1486

Closed
alekseyld opened this issue Oct 14, 2021 · 1 comment
Closed

Edit regex for schemas filenames #1486

alekseyld opened this issue Oct 14, 2021 · 1 comment

Comments

@alekseyld
Copy link

Hello!
The documentation says use "drift_schema_vX.json" file template for schema dump, but cli tools works only with "moor_schema_vX.json" and not generate schema files for tests.

I propose to add an additional group to the regular expression in this line 225

static final _filenames = RegExp(r'moor_schema_v(\d+)\.json');
change to
static final _filenames = RegExp(r'(moor|drift)_schema_v(\d+)\.json');

And also change line 128 where regex is used.

final version = int.parse(match.group(1));
change to
final version = int.parse(match.group(2));

@simolus3
Copy link
Owner

Good catch, thank you! I've fixed this on develop in 849b0de.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants