react-native-expo-raw-sql-migrations
SQLite migration System to use raw SQL for expo managed react native app. Implemented with React Hooks and TypeScript.
Installation
yarn add react-native-expo-raw-sql-migrations# ornpm install --save react-native-expo-raw-sql-migrations
Usage
Normal Way
Automatically migrate.
- Ready to DB object and migration JSON schema.
- Wrap with Provider Component.
- Handle to fetch DB with
useMigrate
custom hook.
// app.tsx;; // 1) Ready to db and migration.; // args are dbname, db-version.; // 2) Wrap provider ;
// SomethingComponent.tsx;
Custom Way
If you would like to handle migration logic yourself, pass starts bootstrap handle options to Provider Component. e.g<MigrationProvider options={{ startsBootstrap: false }}>{...}</MigrationProvider>
Used by
This app is used by Keputo - KPT method - Keep/Problem/Try as expo mobile app.