Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pull nozbe/master #2

Closed
wants to merge 1,348 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
1348 commits
Select commit Hold shift + click to select a range
81bcdc9
Merge pull request #1034 from Nozbe/query-cleanup
radex May 25, 2021
c248cb7
Merge pull request #1036 from Nozbe/query-cleanup3
radex May 25, 2021
67e35da
clean up
radex May 25, 2021
4ce2bc4
Fix SQLite init race condition
radex May 25, 2021
c05d14d
[lokijs] Skip unnecessary clone on query and find - the responses are…
radex May 25, 2021
da33e67
fix ci
radex May 25, 2021
f4b9710
Merge pull request #1037 from Nozbe/query-cleanup4
michalpopek May 26, 2021
44b68e8
Merge pull request #1038 from Nozbe/query-cleanup5
michalpopek May 26, 2021
4d55268
Merge pull request #1039 from Nozbe/query-cleanup6
michalpopek May 26, 2021
2c1bcf1
[jsi] fix spurious rollback error - show the underlying error
radex May 26, 2021
fe0c624
[jsi] remove unnecessary comment
radex May 26, 2021
e698cd2
[jsi] enable soft heap limit on android, failed attempt to set up ver…
radex May 26, 2021
44689ea
v0.23.0-3
radex May 26, 2021
25ef19a
Apply @rozPierog's kotlin suggestions
radex May 26, 2021
33ce296
Merge pull request #1040 from Nozbe/query-cleanup7
michalpopek May 28, 2021
f44ad9c
Merge branch 'master' into query-cleanup8
radex May 31, 2021
f391f25
[sync] don't import ./impl from sync/index
radex May 10, 2021
8bc6166
Use Hermes in androidTest
radex May 31, 2021
3654d20
Add @nozbe/simdjson dependency
radex May 31, 2021
13a45c0
Integrate simdjson
radex May 31, 2021
2a0ca0f
[jsi] fix crash on app reload on Android
radex May 31, 2021
3b6e0f8
[jsi] use WAL mode
radex May 31, 2021
a5cdabe
[jsi] fix IO errors by using memory temp_store
radex May 31, 2021
0416448
[native] add hermes indicator in tester
radex May 31, 2021
0880446
[jsi] Clean up DatabaseInstallation
radex May 31, 2021
5e07857
Merge pull request #1047 from Nozbe/query-cleanup8
michalpopek Jun 1, 2021
be2fcf2
cocoapods: build with -Os by default
radex Jun 1, 2021
8eeb509
v0.23.0-4
radex Jun 2, 2021
d5982e4
[jsi] clean up prepareQuery etc
radex Jun 2, 2021
4f6bb21
[jsi] DRY repetitive sqlite/jsi handling
radex Jun 2, 2021
3377976
[sqlite] remove unnecessary encodeName
radex Jun 2, 2021
39be48b
[sqlite] Simplify dispatcher & make it more similar to how Loki Dispa…
radex Jun 2, 2021
b1233d0
Move DatabaseBridge invariant to a more appropriate place
radex Jun 2, 2021
0c3ccc7
+ decodeQueryResult
radex Jun 2, 2021
ab12dd0
[jsi] queryAsArray optimization for iOS
radex Jun 2, 2021
d8daebc
update changelog
radex Jun 2, 2021
8192d7a
[jsi] + batchJSON
radex Jun 2, 2021
f6b3e4d
[jsi] integrate npm-based simdjson with cocoapod in a bad, ugly way
radex Jun 2, 2021
f901787
[jsi] hook up simdjson batch
radex Jun 2, 2021
8eb59b3
clean up naughty strings
radex Jun 4, 2021
d12d5ef
Update changelog
radex Jun 4, 2021
119a177
[sqlite] Encode create/drop indices
radex Jun 4, 2021
ae40b81
[sqlite] encodeSchema - clean up
radex Jun 4, 2021
875277d
[sqlite] Allow unsafeSql to be used with index drop&recreate optimiza…
radex Jun 4, 2021
dde3766
[sqlite] codesize - don't export things that only need export for tes…
radex Jun 4, 2021
3e92047
[sqlite] Recreate indices on large batches
radex Jun 4, 2021
87e40b4
[jsi] Stub out unsafeLoadFromSync
radex Jun 4, 2021
d6b7508
[jsi] copy over (somewhat broken) unsafeLoadFromSync
radex Jun 4, 2021
032c1ca
[jsi] wip implementation of returning residual values from unsafeLoad…
radex Jun 7, 2021
d663a52
fix(typescript): incorrect action, writer and reader types
mlecoq Jun 7, 2021
05d3b0f
fix(typescript): missing unsafeSqlQuery method
mlecoq Jun 7, 2021
f311268
Merge pull request #1063 from mlecoq/hotfix/missingSqlUnsafeQuery
radex Jun 7, 2021
7596f27
Merge pull request #1062 from mlecoq/hotfix/decoratorTypes
radex Jun 7, 2021
eb31afd
[jsi] return residual values
radex Jun 8, 2021
1c8081a
[jsi] fix residual value return
radex Jun 8, 2021
d655925
[jsi] sanitize values
radex Jun 9, 2021
6f2c5f7
[jsi] fix sanitize values
radex Jun 9, 2021
fec123b
[jsi] fix behavior on extra columns
radex Jun 9, 2021
5ec5a7e
[jsi] clean up, add some tests
radex Jun 9, 2021
3de2cc0
[jsi] clean up
radex Jun 9, 2021
1f2e8bf
Merge pull request #1051 from Nozbe/turbo/1
michalpopek Jun 9, 2021
dd3ee70
build(deps): bump glob-parent from 5.1.1 to 5.1.2 in /examples/native
dependabot[bot] Jun 9, 2021
59cdd8f
Merge pull request #1053 from Nozbe/turbo/2
michalpopek Jun 9, 2021
5bbeb06
Merge pull request #1054 from Nozbe/turbo/3
michalpopek Jun 9, 2021
f3fa1c9
[jsi] test for extra tables, bad ordering, multiple tables
radex Jun 9, 2021
55194a6
[jsi] recreate indices when loading from sync
radex Jun 9, 2021
afcc696
[jsi] provideSyncJson, getSyncJson, deleteSyncJson platform impls (un…
radex Jun 9, 2021
f252e85
[jsi] Public interface to provide native json - android (untested)
radex Jun 9, 2021
5454273
[jsi] Public interface to provide native json - ios (untested)
radex Jun 9, 2021
3d47fc4
[jsi] Use provideSyncJson api for tests
radex Jun 9, 2021
02df118
fix?
radex Jun 10, 2021
6397383
[jsi] fix android
radex Jun 10, 2021
44aebfb
[jsi] align android behavior with ios
radex Jun 10, 2021
69ab20c
[sync] skip unnecessary writer nesting
radex Jun 10, 2021
25a3f0b
[sync] add unsafeTurbo
radex Jun 10, 2021
bb2b291
Document Turbo Login
radex Jun 10, 2021
1844338
[sync] add onDidPullChanges
radex Jun 10, 2021
0e6c26b
v0.23.0-4
radex Jun 10, 2021
4f4c2d8
v0.23.0-5
radex Jun 10, 2021
2dcfb56
change how simdjson is integrated on iOS
radex Jun 10, 2021
7ab5774
v0.23.0-6
radex Jun 10, 2021
e744809
Fix installation guide
radex Jun 10, 2021
19510a7
Merge pull request #1058 from Nozbe/turbo/4
michalpopek Jun 14, 2021
2261793
Merge pull request #1059 from Nozbe/turbo/5
michalpopek Jun 14, 2021
78404e8
[jsi] Fix handling of large integers (like js timestamps)
radex Jun 14, 2021
873f839
[jsi] make providing jsons thread-safe
radex Jun 14, 2021
36d66c0
v0.23.0-7
radex Jun 14, 2021
6d4bb8e
v0.23.0-8
radex Jun 14, 2021
d6e0cc5
Merge pull request #1064 from Nozbe/turbo/6
michalpopek Jun 15, 2021
18bf447
+ common/isRN
radex Jun 15, 2021
b3e6b0c
+ debugPrintChanges
radex Jun 15, 2021
6c607c3
build(deps-dev): bump postcss from 7.0.14 to 7.0.36 in /examples/web
dependabot[bot] Jun 16, 2021
2351584
Merge pull request #1072 from Nozbe/dependabot/npm_and_yarn/examples/…
radex Jun 16, 2021
3290fdc
[sync] add regression test for modified created while pushing bug
radex Jun 17, 2021
9342039
[Model] Modernize tests
radex Jun 17, 2021
347332c
[Model] Add tests for new expected behavior of _changed
radex Jun 17, 2021
ab786b3
Document changes to _changed
radex Jun 17, 2021
15f5a08
[sync] Fix update created during push
radex Jun 17, 2021
73f8dcd
fix ci
radex Jun 17, 2021
b43de50
v0.23.0-9
radex Jun 17, 2021
6f3634e
Fix turboLogin crash on non-enUS locales in debug mode
radex Jun 22, 2021
752d073
v0.23.0-10
radex Jun 22, 2021
f64127f
Merge pull request #1066 from Nozbe/turbo/7
michalpopek Jun 23, 2021
44150a6
build(deps): bump color-string from 1.5.4 to 1.5.5 in /examples/native
dependabot[bot] Jun 23, 2021
f335122
Merge branch 'master' into turbo/8
radex Jun 23, 2021
beb2363
Merge pull request #1067 from Nozbe/turbo/8
radex Jun 23, 2021
68752f1
Merge pull request #1070 from Nozbe/turbo/9
radex Jun 23, 2021
14f48b5
Merge pull request #1073 from Nozbe/sync-fixes
radex Jun 23, 2021
a9ed7e0
Merge pull request #1065 from Nozbe/dependabot/npm_and_yarn/examples/…
radex Jun 23, 2021
baed8de
Merge pull request #1076 from Nozbe/dependabot/npm_and_yarn/examples/…
radex Jun 23, 2021
1b8f637
wtf, that should never have worked
radex Jun 23, 2021
666876d
clean up
radex Jun 23, 2021
a73e097
subscribeToQueryWithColumns: add regression test
radex Jun 23, 2021
6429b0c
partial fix for update list before model (regresses another test)
radex Jun 23, 2021
a1ee1f4
Fix subscribeToQueryWithColumns?
radex Jun 23, 2021
a03e49b
Extend the fix to all observation engines
radex Jun 23, 2021
db89b52
some cleanup
radex Jun 23, 2021
87ff594
v0.23.0-11
radex Jun 23, 2021
8734aed
changelog
radex Jun 23, 2021
8389082
Fix code example
sarons Jun 26, 2021
3be6718
Merge pull request #1080 from sarons/patch-1
radex Jun 28, 2021
5f20464
Merge branch 'master' into various/0628
radex Jun 28, 2021
efd6f07
Update withObservables
radex Jun 28, 2021
97bd69f
Merge pull request #1077 from Nozbe/subscription-nesting-fix
kokusGr Jul 1, 2021
e8b8f8f
fix missing curly bracket in type.d.ts
upacyxou Jul 7, 2021
efb3351
Merge pull request #1087 from upacyxou/patch-1
radex Jul 8, 2021
77e3e0d
Merge pull request #1100 from Nozbe/various/0628
radex Jul 15, 2021
29c126c
nitpick
radex Jul 15, 2021
33f81bd
v0.23.0-12
radex Jul 15, 2021
bcc0fc6
test order in databaseTests
radex Jul 21, 2021
02aba2f
remove `experimental` moniker fro sortBy, take, skip
radex Jul 21, 2021
77b61cb
encodeQuery - wrap dev invariants in env check
radex Jul 21, 2021
4b474b0
databaseTests - test Q.sortBy more thoroughly
radex Jul 22, 2021
954db5e
Add sortBy/skip/take support on lokijs
radex Jul 22, 2021
e807d08
Improve documentation & update changelog
radex Jul 22, 2021
63a2ca3
Update Changelog
radex Jul 22, 2021
6027610
v0.23.0
radex Jul 22, 2021
cb0cca6
Update docs
radex Jul 22, 2021
bda4751
Fix tiny nit in Query documentation
olliewd Jul 24, 2021
a702d3b
[jsi] Destroy Database on catalyst instance destroy, before JSI Execu…
radex Jul 26, 2021
ef55954
[jsi] destroy Databases on the mqt_js thread
radex Jul 26, 2021
7289d00
Fix tiny nit in Query documentation
olliewd Jul 26, 2021
db8f685
[jsi] document this mess
radex Jul 26, 2021
bc359d7
v0.23.1-0
radex Jul 26, 2021
38dfb5d
Merge pull request #1117 from olliewd/patch-1
radex Jul 26, 2021
06607ae
Merge pull request #1118 from Nozbe/jsi-threading-fix
rozPierog Jul 27, 2021
bfffb00
Merge branch 'master' into query-improvements
radex Jul 27, 2021
a074b06
Merge pull request #1112 from Nozbe/query-improvements
radex Jul 27, 2021
e8d631b
[jsi] add mutex&locks on all jsi-invoked operations
radex Jul 28, 2021
9620b2c
[jsi] some things worth trying later
radex Jul 28, 2021
ba787c2
v0.23.1-1
radex Jul 28, 2021
e4020e4
[jsi] trying out a few more things
radex Jul 28, 2021
d836df1
v0.23.1-2
radex Jul 28, 2021
4bbfdfe
clean up?
radex Aug 4, 2021
ab1d5ab
v0.23.1-3
radex Aug 4, 2021
8b870f4
Merge pull request #1123 from Nozbe/jsi-threading-fix2
radex Aug 4, 2021
8a1309a
Fix typo in docs: `withComponents` -> `withObservables`
williamdclt Aug 5, 2021
c48adaa
Merge pull request #1125 from williamdclt/patch-1
radex Aug 9, 2021
391c98e
Add link to Laravel Watermelon package
nathanheffley Aug 10, 2021
f96f153
Merge branch 'master' into jsi-threading-fix2
radex Aug 10, 2021
192e0f0
usesExclusiveLocking
radex Aug 10, 2021
76cc137
v0.23.1-4
radex Aug 10, 2021
5dda434
bump rxjs version to 7.3.0
radex Aug 10, 2021
9a0b55a
remove unused peril & rollup scripts
radex Aug 10, 2021
cbeb44a
Update changelog
radex Aug 10, 2021
17a911a
fix ci issues
radex Aug 10, 2021
1f6a441
v0.23.1-5
radex Aug 10, 2021
1de613c
Update Sync.md
nathanheffley Aug 10, 2021
09484bc
Update Sync.html
nathanheffley Aug 10, 2021
c7348d9
Merge pull request #1129 from nathanheffley/patch-1
radex Aug 10, 2021
11df7c7
build(deps): bump path-parse from 1.0.6 to 1.0.7
dependabot[bot] Aug 10, 2021
399f517
build(deps): bump path-parse from 1.0.6 to 1.0.7 in /examples/native
dependabot[bot] Aug 11, 2021
a7826e2
build(deps): bump path-parse from 1.0.6 to 1.0.7 in /examples/web
dependabot[bot] Aug 11, 2021
d96f60a
Merge pull request #1130 from Nozbe/jsi-threading-fix2
kokusGr Aug 13, 2021
d1e6e21
Merge pull request #1131 from Nozbe/rxjs7
radex Aug 16, 2021
a0d64f9
Fixes typescript annotations in src/Collection and src/adapters/sqlite
calebgregory Aug 26, 2021
53299d5
Merge pull request #1146 from calebgregory/typescript-annotations
radex Aug 27, 2021
ebdb106
doc: android should specify kotlin version to 1.3.50 or above
Elabar Aug 30, 2021
3307598
Merge pull request #1152 from Elabar/fix-kotlin-version-in-doc
rozPierog Aug 30, 2021
483f28e
build(deps): bump tar from 6.1.0 to 6.1.11
dependabot[bot] Aug 31, 2021
e86f2da
build(deps): bump tar from 4.4.8 to 4.4.19 in /examples/web
dependabot[bot] Sep 1, 2021
7102fdf
[android] allow user to pass flags to SQLiteDatabase
radex Sep 2, 2021
8520d2b
[jsi] add unsafe hook to listen to all jsi errors + add unsafe db clo…
radex Sep 2, 2021
7c06012
v0.23.1-6
radex Sep 2, 2021
75c19cd
[jsi] Add more understandable error message if DB setup fails
radex Sep 2, 2021
632e644
v0.23.1-7
radex Sep 2, 2021
9fad685
Add Chatable to Readme
He1nr1chK Sep 18, 2021
c457105
Merge pull request #1168 from He1nr1chK/master
radex Sep 20, 2021
3d994a8
[ImgBot] Optimize images
ImgBotApp Sep 20, 2021
acb817c
Merge pull request #1169 from Nozbe/imgbot
radex Sep 20, 2021
c709715
build(deps): bump tmpl from 1.0.4 to 1.0.5
dependabot[bot] Sep 21, 2021
e946198
build(deps): bump tmpl from 1.0.4 to 1.0.5 in /examples/native
dependabot[bot] Sep 21, 2021
4758a72
[sync] experimentalRejectedIds
radex Sep 22, 2021
791d4c8
one more test & a bit of a doc
radex Sep 22, 2021
c34446f
Disposable records
radex Sep 22, 2021
01fee1d
format
radex Sep 22, 2021
e05a83d
Merge pull request #1156 from Nozbe/database-corruption-2137
rozPierog Sep 22, 2021
1b512b0
📦 Update simdjson to 1.0.0
radex Sep 22, 2021
ce00161
[turbo] replace my ghetto to_json_string with simdjson::'s
radex Sep 22, 2021
dcf5c07
📦 Update sqlite to 3.36.0
radex Sep 22, 2021
0937d29
+ LocalStorage
radex Sep 22, 2021
90f2ac4
Hook up LocalStorage to database
radex Sep 22, 2021
2e2aab3
Merge branch 'master' into various/0922
radex Sep 22, 2021
d2cddf0
v0.23.1-8
radex Sep 22, 2021
487a2a0
Merge pull request #1173 from Nozbe/various/0922
michalpopek Sep 27, 2021
e8d51ae
add logo
upacyxou Oct 1, 2021
b3bd44f
add todorant logo in readme
upacyxou Oct 1, 2021
486d0b6
update lokijs types
radex Oct 14, 2021
9906260
@json: fast path, optional memoization
radex Oct 14, 2021
f6615b0
LocalStorage._getSync
radex Oct 15, 2021
7ba6792
@json memo test
radex Oct 15, 2021
3a982bf
make lokijs and sqlite adpaters distinguishable at runtime
radex Oct 15, 2021
880aff2
update changelog
radex Oct 15, 2021
965d223
Update Loki version
radex Oct 15, 2021
dfba32a
v0.23.1-9
radex Oct 15, 2021
3fe9865
Update README.md
radex Oct 26, 2021
c1346f0
Update changelog
radex Oct 28, 2021
d265438
v0.24.0
radex Oct 28, 2021
a042d84
Update docs
radex Oct 28, 2021
e32a4d9
Merge branch 'master' into loki/0930
radex Oct 28, 2021
68cedbf
[loki] remove preloads
radex Oct 28, 2021
028464a
Merge branch 'loki/0930'
radex Oct 28, 2021
4a20e25
Merge pull request #1182 from Borodutch/master
radex Oct 28, 2021
20ac882
Merge pull request #1171 from Nozbe/dependabot/npm_and_yarn/examples/…
radex Oct 28, 2021
d6747df
Merge pull request #1170 from Nozbe/dependabot/npm_and_yarn/tmpl-1.0.5
radex Oct 28, 2021
99c2390
Merge pull request #1155 from Nozbe/dependabot/npm_and_yarn/examples/…
radex Oct 28, 2021
9603bd0
Merge pull request #1134 from Nozbe/dependabot/npm_and_yarn/examples/…
radex Oct 28, 2021
0bdbc00
Merge pull request #1154 from Nozbe/dependabot/npm_and_yarn/tar-6.1.11
radex Oct 28, 2021
d80296c
Merge pull request #1132 from Nozbe/dependabot/npm_and_yarn/path-pars…
radex Oct 28, 2021
71e038f
Merge pull request #1133 from Nozbe/dependabot/npm_and_yarn/examples/…
radex Oct 28, 2021
77079f1
Clean up DatabaseBridge.kt
radex Oct 28, 2021
6e0d7f1
note to self about cavy native reporter
radex Oct 28, 2021
644307a
add missing cassert import
radex Oct 28, 2021
6acae60
Fix ccache-clang
radex Oct 28, 2021
b7ae103
ios tester: copy over NT's jsLocation handling
radex Oct 28, 2021
31c1d8c
unbreak dev mode
radex Oct 28, 2021
745f3dd
watermelon native tester - more helpful ui
radex Oct 29, 2021
b5cb824
fix JSI testing in simulator
radex Oct 29, 2021
a3ce82a
Improve JSLockPerfHack fallback
radex Oct 29, 2021
d8a8af5
Enable JSLockPerfHack for iOS 15
radex Oct 29, 2021
0fffb69
Disallow Q.where(xxx, undefined)
radex Oct 29, 2021
2a6b8ea
fix broken test
radex Oct 29, 2021
66c32c9
[docs] Explain dangers of Q.like
radex Oct 29, 2021
ed31ae5
Add Q.includes()
radex Oct 29, 2021
d679eb5
Bump LokiJS
radex Oct 29, 2021
ce5ee9c
Bump RxJS
radex Oct 29, 2021
1b4981f
Fix sync for non-globally-unique IDs
radex Oct 29, 2021
7905072
v0.24.1-0
radex Oct 29, 2021
b118042
Merge pull request #1198 from Nozbe/various/1028
kokusGr Nov 3, 2021
691b0ea
Merge branch 'master' of github.com:Nozbe/WatermelonDB into observabl…
zhirzh Nov 8, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[jsi] use WAL mode
radex committed May 31, 2021
commit 3b6e0f81ef08fe4c8a82bd67aae36bf6a92f7aaf
1 change: 1 addition & 0 deletions CHANGELOG-Unreleased.md
Original file line number Diff line number Diff line change
@@ -50,6 +50,7 @@
- All Watermelon console logs are prepended with a 🍉 tag
- Extra protections against improper use of writers/readers (formerly actions) have been added
- Queries with multiple top-level `Q.on('table', ...)` now produce a warning. Use `Q.on('table', [condition1, condition2, ...])` syntax instead.
- [jsi] WAL mode is now used

### Fixes

2 changes: 2 additions & 0 deletions native/shared/Database.cpp
Original file line number Diff line number Diff line change
@@ -9,6 +9,8 @@ using platform::consoleLog;

Database::Database(jsi::Runtime *runtime, std::string path) : runtime_(runtime) {
db_ = std::make_unique<SqliteDb>(path);

executeMultiple("pragma journal_mode = WAL;");
}

jsi::Runtime &Database::getRt() {
4 changes: 2 additions & 2 deletions src/adapters/sqlite/encodeSchema/index.js
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ import encodeName from '../encodeName'
import encodeValue from '../encodeValue'

const standardColumns = `"id" primary key, "_changed", "_status"`
const localStorageSchema =
const commonSchema =
'create table "local_storage" ("key" varchar(16) primary key not null, "value" text not null);' +
'create index "local_storage_key_index" on "local_storage" ("key");'

@@ -49,7 +49,7 @@ export const encodeSchema: (AppSchema) => SQL = ({ tables, unsafeSql }) => {
// $FlowFixMe
.map(encodeTable)
.join('')
return transform(sql + localStorageSchema, unsafeSql)
return transform(commonSchema + sql, unsafeSql)
}

const encodeCreateTableMigrationStep: (CreateTableMigrationStep) => SQL = ({ schema }) =>
10 changes: 5 additions & 5 deletions src/adapters/sqlite/encodeSchema/test.js
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@ import { addColumns, createTable, unsafeExecuteSql } from '../../../Schema/migra

import { encodeSchema, encodeMigrationSteps } from './index'

const expectedLocalStorageSchema =
const expectedCommonSchema =
'create table "local_storage" ("key" varchar(16) primary key not null, "value" text not null);' +
'create index "local_storage_key_index" on "local_storage" ("key");'

@@ -32,13 +32,13 @@ describe('encodeSchema', () => {
})

const expectedSchema =
expectedCommonSchema +
'create table "tasks" ("id" primary key, "_changed", "_status", "author_id", "order", "created_at");' +
'create index "tasks_author_id" on "tasks" ("author_id");' +
'create index "tasks_order" on "tasks" ("order");' +
'create index "tasks__status" on "tasks" ("_status");' +
'create table "comments" ("id" primary key, "_changed", "_status", "is_ended", "reactions");' +
'create index "comments__status" on "comments" ("_status");' +
expectedLocalStorageSchema
'create index "comments__status" on "comments" ("_status");'

expect(encodeSchema(testSchema)).toBe(expectedSchema)
})
@@ -57,10 +57,10 @@ describe('encodeSchema', () => {

const expectedSchema =
'create blabla;' +
expectedCommonSchema +
'create table "tasks" ("id" primary key, "_changed", "_status", "author_id") without rowid;' +
'create index "tasks_author_id" on "tasks" ("author_id");' +
'create index "tasks__status" on "tasks" ("_status");' +
expectedLocalStorageSchema
'create index "tasks__status" on "tasks" ("_status");'

expect(encodeSchema(testSchema)).toBe(expectedSchema)
})