lus / pasty

pasty is a fast and lightweight code pasting server
https://pasty.lus.pm
MIT License
200 stars 28 forks source link

Deprecate & remove additional storage drivers #39

Open lus opened 2 years ago

lus commented 2 years ago

I think removing all storage drivers except the PostgreSQL one would be a good idea.

One major problem when it comes to the implementation of new features that somewhat affect the paste models is that we always have to keep in mind that old data has to be migrateable.

Only the PostgreSQL driver implements auto-migration and maintaining migration logic for every single storage driver would dramatically decrease the development effectivity. Migrating pastes stored with another driver always include the manual import and export tool which is annoying.

However, we should keep the file storage driver but restrict it to only be accessible when in development mode to not force the developer to set up a fully-fledged PSQL database just to improve some part of the frontend.

Setting up PostgreSQL should not be an issue and I think removing support for other storage options is an acceptable trade-off to achieve a much better development effectivity and flexibility.

Fastidious commented 2 years ago

This could certainly kill pasty for me (unless I run it always in debug mode). I do not use SQL, just the default file system storage.

lus commented 2 years ago

I think I can agree on only supporting PostgreSQL and SQLite as I can write similar migrations for both of them. SQLite would allow you to run pasty without setting up a dedicated PostgreSQL server, just like with the current file system storage.