You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WatermelonDB specifically avoids the databases/ directory on this line of Database.kt stating that: // On some systems there is some kind of lock on /databases folder ¯\_(ツ)_/¯.
However, if that was the case, many major libraries would simply not work.
I traced the comment back to the 'initial commit' of the entire project, with no specific reference to why this was added. I don't immediately see why it would be the case, so could we consider simply removing the code.
However, doing so would make it not work because existing databases are located outside the standard directory. So we'd need what #927 would implement to truly make that transition (or auto-detect it, defaulting to databases/).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In issue #927 it was requested to change the path of a database. If a team wants to use Flipper or Android Studio to inspect the database (which seems reasonable) on an Android device, then it won't appear because SQLite databases are supposed to be placed in the "data" directory under the
databases/
subdirectory.WatermelonDB specifically avoids the
databases/
directory on this line of Database.kt stating that:// On some systems there is some kind of lock on /databases folder ¯\_(ツ)_/¯
.However, if that was the case, many major libraries would simply not work.
I traced the comment back to the 'initial commit' of the entire project, with no specific reference to why this was added. I don't immediately see why it would be the case, so could we consider simply removing the code.
However, doing so would make it not work because existing databases are located outside the standard directory. So we'd need what #927 would implement to truly make that transition (or auto-detect it, defaulting to
databases/
).For now, because I'm adding WatermelonDB to a new project, so I'm adding a patch-package patch to avoid this weird hack.
But my question is: Why was this
.replace("/databases", "")
code ever added?Beta Was this translation helpful? Give feedback.
All reactions