FilledStacks / FilledStacks/sqflite_migration

Migrations with "--" in text strings fail

Open
#10 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
16
Forks
12
PR merge metrics
No merged PRs in 30d

Description

Hi @FilledStacks,
First off, I love all your content! But my query below is failing when using this plugin because it has a string that contains "--". I think https://github.com/FilledStacks/sqflite_migration/blob/396b9a762054157b00cd5bc6b01739ab17428b15/lib/src/database_migration_service.dart#L29-L40 is the problem because it doesn't take situations where "--" might be valid. For example,

```sql
CREATE TABLE Assets (
id INTEGER NOT NULL PRIMARY KEY
,filePath TEXT NOT NULL
,nameSingular TEXT NOT NULL
,namePlural TEXT NOT NULL
,sourceUrl TEXT NOT NULL
,active INTEGER NOT NULL DEFAULT 1
);

INSERT INTO Assets (
id
,filePath
,nameSingular
,namePlural
,sourceUrl
,active
) VALUES (
1
,'assets/svg/openclipart.com/francesco_rollandin/Architetto----Dino-08.svg' -- notice the '----' in the path
,'Dinosaur'
,'Dinosaurs'
,'https://openclipart.org/detail/25749/architetto-dino-08'
,1
);
```

This isn't a total deal-breaker in my case because I can just change the filename, but others may run into this issue and be like, AAAAAAAAAHHHHHH!!!!!!

Thanks to everyone at FilledStacks!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.