Convert JSON storage to SQLite #3
Reference in New Issue
Block a user
Delete Branch "sqlite-storage"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@@ -0,0 +4,4 @@const dataDir =process.env.FCM_TOKEN_DATA_DIR ?? path.join(process.cwd(), "data");const dbFile = path.join(dataDir, "fcm-tokens.sqlite");Let's make this DB a generic name for all wakeup notification purposes, eg. "notify.sqlite"
I renamed the database file accordingly.
I asked AI about also changing the name to FCM_TOKEN_DATA_DIR (as a what-if), and it brought up good points for and against. I'm curious what your thoughts are on it?
I'm not clear on that... it sounds like you are saying that it would be "FCM_TOKEN_DATA_DIR.sqlite", but it seems odd to put a "_DIR" name on the file.
Maybe you mean to have another environment variable like FCM_TOKEN_DATA_FILENAME, so the full change would be something like this:
That seems reasonable, but my feeling is that it adds some complexity (eg. if people name it something else then the file is harder to find) and it doesn't seem like the benefit of flexibility is worth it.
Or maybe you meant something else.
Ahh sorry, I bungled the wording on that last reply. I meant "…changing the name of FCM_TOKEN_DATA_DIR" (the name of the environment variable that specifies the directory where notify.sqlite resides).