File tree 9 files changed +20
-6
lines changed
9 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,12 @@ function ScreenContent() {
76
76
</ Text >
77
77
< Text className = "text-sm" >
78
78
If you change the schema, you need to run{ " " }
79
+ < Text className = "text-sm font-mono text-muted-foreground bg-muted" >
80
+ bun db:generate
81
+ </ Text >
82
+ < Text className = "text-sm px-1" >
83
+ then
84
+ </ Text >
79
85
< Text className = "text-sm font-mono text-muted-foreground bg-muted" >
80
86
bun migrate
81
87
</ Text >
Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ export default function Home() {
42
42
} )
43
43
. where ( eq ( habitTable . id , habitId ) )
44
44
. execute ( ) ;
45
- console . log ( "restore" )
46
45
} catch ( error ) {
47
46
console . error ( "error" , error ) ;
48
47
}
@@ -56,7 +55,6 @@ export default function Home() {
56
55
{
57
56
text : 'Continue' ,
58
57
onPress : ( ) => {
59
- console . log ( "pressed" )
60
58
// try {
61
59
// await db?.delete(habitTable).where(eq(habitTable.id, habitId)).execute();
62
60
// } catch (error) {
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import { useDatabase } from "./provider";
4
4
import { useEffect , useReducer } from "react" ;
5
5
6
6
export const initialize = async ( ) : Promise < SQLJsDatabase > => {
7
- console . log ( "initialze web" ) ;
8
7
const sqlPromise = initSqlJs ( {
9
8
locateFile : ( file ) => `https://sql.js.org/dist/${ file } ` ,
10
9
} ) ;
Original file line number Diff line number Diff line change 15
15
"when" : 1719918496003 ,
16
16
"tag" : " 0001_absurd_blonde_phantom" ,
17
17
"breakpoints" : true
18
+ },
19
+ {
20
+ "idx" : 2 ,
21
+ "version" : " 6" ,
22
+ "when" : 1726505292364 ,
23
+ "tag" : " 0002_short_dagger" ,
24
+ "breakpoints" : true
18
25
}
19
26
]
20
27
}
Original file line number Diff line number Diff line change 3
3
import journal from './meta/_journal.json' ;
4
4
import m0000 from './0000_cultured_lizard.sql' ;
5
5
import m0001 from './0001_absurd_blonde_phantom.sql' ;
6
+ import m0002 from './0002_short_dagger.sql' ;
6
7
7
8
export default {
8
9
journal,
9
10
migrations : {
10
11
m0000,
11
- m0001
12
+ m0001,
13
+ m0002
12
14
}
13
15
}
14
16
Original file line number Diff line number Diff line change @@ -4,4 +4,5 @@ export default {
4
4
out : './db/migrations' ,
5
5
driver : 'expo' ,
6
6
dialect : 'sqlite' ,
7
- } satisfies Config ;
7
+
8
+ } satisfies Config ;
Original file line number Diff line number Diff line change 14
14
"web" : " expo start -c --web" ,
15
15
"export" : " expo export -p web" ,
16
16
"format" : " biome check --no-errors-on-unmatched --apply ." ,
17
+ "db:generate" : " bun drizzle-kit generate" ,
17
18
"migrate" : " bun ./db/migrate.ts" ,
18
19
"db:studio" : " bun drizzle-kit studio"
19
20
},
68
69
"react-native-screens" : " 3.31.1" ,
69
70
"react-native-svg" : " 15.3.0" ,
70
71
"react-native-web" : " ~0.19.6" ,
71
- "sql.js" : " ^1.10.3 " ,
72
+ "sql.js" : " ^1.11.0 " ,
72
73
"tailwind-merge" : " ^2.2.1" ,
73
74
"tailwindcss-animate" : " ^1.0.7" ,
74
75
"zod" : " ^3.23.6" ,
You can’t perform that action at this time.
0 commit comments