-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: model.sync add force/alter option #224
Conversation
src/realm.js
Outdated
if (!this.connected) await this.connect(); | ||
const { models } = this; | ||
|
||
for (const model of Object.values(models)) { | ||
await model.sync(); | ||
await model.sync(optins); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/optins/options
@xudafeng this pr breaks yuque-desktop, I think it should be planned in v2 release. Perhaps 2022.1.1 is a good time? |
Codecov Report
@@ Coverage Diff @@
## master #224 +/- ##
=======================================
Coverage 97.25% 97.25%
=======================================
Files 42 42
Lines 3096 3101 +5
=======================================
+ Hits 3011 3016 +5
Misses 85 85
Continue to review full report at Codecov.
|
@@ -135,7 +135,7 @@ describe('=> Table definitions', () => { | |||
}); | |||
}); | |||
|
|||
describe('=> Bone.sync()', () => { | |||
describe.only('=> Bone.sync()', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥲
will be released at v2.x milestone |
id: DataTypes.BIGINT, | ||
name: DataTypes.STRING, | ||
}); | ||
await realm.sync({ alter: true }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个好。
* feat: model.sync add force/alter option * fix: integration test case * fix: typo and reminder * fix: remove .only Co-authored-by: mijiu.zc <mijiu.zc@alibaba-inc.com>
fixes #151