Drizzle not creating tables

I am using the Drizzle hook const { success, error } = useMigrations(db, migrations); My project uses expo-sqlite database. I notice that on app first launch if my database and tables setup correctly on simulator. However when I build for real device expo preview build the database tables never get setup. I exported schema. Everything workss correctly for simulator just not on real device. I was testing on iOS
1 Reply
Music Coding
Music CodingOP5w ago
I solved this problem. I needed to add a if statement to check if migration was finished before anything try to use the database

Did you find this page helpful?