adriangb / asyncpg-trek

Simple migrations system for asyncpg
MIT License
9 stars 3 forks source link

feat(backend): added aiosqlite as a new backend #12

Closed euri10 closed 4 months ago

euri10 commented 4 months ago

greetings @adriangb !

not sure if this little PR would suit you since the name of the package is very postgresql-centric but I hacked this real quick as I needed it and it was rather easy as the abstractions are very good.

lmk if that suits you, I'm going on holidays tomorrow so likely won't be fast to answer though !

some little comments:

  1. I added latest version of aiosqlite and it's python >= 3.8 so I had to remove 3.7 support here which is not necessarily suitable, I took the opportunity to add 3.11 and 3.12 though
  2. I added extras so that you install either asyncpg or aiosqlite depending on which driver you target
  3. CREATE_TABLE and CREATE_INDEX have to be seperated, sqlite doesnt accept ; in scripts it seems.
  4. I kept the tests folder asyncpg_revisions even for aiosqlite, there doesnt seem to be any driver-specific differences in it anyways.
adriangb commented 4 months ago

You know I was planning on keeping this postgres only BUT given that this change is so clean and that I suspect your the main user of this package let's do it! Please just bump the version and we can merge.