-
Notifications
You must be signed in to change notification settings - Fork 617
Adding an "extras" column to transport databases #578
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
167aa5c
to
58dee2d
Compare
58dee2d
to
0b40241
Compare
0b40241
to
f20b6a9
Compare
aa9f55e
to
4e0b941
Compare
4e0b941
to
7179566
Compare
vkryachko
requested changes
Jul 3, 2019
...n/java/com/google/android/datatransport/runtime/scheduling/persistence/SQLiteEventStore.java
Outdated
Show resolved
Hide resolved
...main/java/com/google/android/datatransport/runtime/scheduling/persistence/SchemaManager.java
Outdated
Show resolved
Hide resolved
...main/java/com/google/android/datatransport/runtime/scheduling/persistence/SchemaManager.java
Outdated
Show resolved
Hide resolved
...main/java/com/google/android/datatransport/runtime/scheduling/persistence/SchemaManager.java
Outdated
Show resolved
Hide resolved
...n/java/com/google/android/datatransport/runtime/scheduling/persistence/SQLiteEventStore.java
Outdated
Show resolved
Hide resolved
vkryachko
reviewed
Jul 3, 2019
...main/java/com/google/android/datatransport/runtime/scheduling/persistence/SchemaManager.java
Outdated
Show resolved
Hide resolved
vkryachko
reviewed
Jul 3, 2019
...n/java/com/google/android/datatransport/runtime/scheduling/persistence/SQLiteEventStore.java
Outdated
Show resolved
Hide resolved
/retest |
/retest |
vkryachko
reviewed
Jul 12, 2019
...main/java/com/google/android/datatransport/runtime/scheduling/persistence/SchemaManager.java
Outdated
Show resolved
Hide resolved
db.execSQL(DROP_CONTEXTS_SQL); | ||
// Indices are dropped automatically when the tables are dropped | ||
|
||
onCreate(db); |
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.
I think this is wrong, and should instead be onUpgrade(0, newVersion)
, am I missing something?
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.
Net effect is the same.
@Override
public void onCreate(SQLiteDatabase db) {
ensureConfigured(db);
// schemaVersion here should be the same as the newVersion in onDowngrade.
upgrade(db, 0, schemaVersion);
}
...main/java/com/google/android/datatransport/runtime/scheduling/persistence/SchemaManager.java
Outdated
Show resolved
Hide resolved
.../java/com/google/android/datatransport/runtime/scheduling/persistence/SchemaManagerTest.java
Outdated
Show resolved
Hide resolved
vkryachko
reviewed
Jul 12, 2019
.../java/com/google/android/datatransport/runtime/scheduling/persistence/SchemaManagerTest.java
Outdated
Show resolved
Hide resolved
vkryachko
approved these changes
Jul 12, 2019
ashwinraghav
added a commit
that referenced
this pull request
Aug 13, 2019
* Moving schema manager to separate file Injecting sql queries for better testability * Extracting index queries * Removed migrations * Fix schema manager * Fixed tests * Fixed instrumentation tests * Java format * Adding an "extras" column to transport databases (#578) * Legacy Firelog backend impl (#610) * Added tests for upgrade * Added tests for nullability * Modelling creates as migrations * Review feedback * Review feedbackwq * Throwing exception * added test * java formatting * Fixed tests * Apis to wire in extras (#581) * Review feedback * Review feedback * Apis to wire in extras * 1 * Flg destination * Tests * Fixed test * Review feedback * Review feedback * Added lflg transport * Review feedback
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
extras
column to thetransport_contexts
table.Both options do not yield us enough value, with the potential to introduce bugs.
SQLiteEventStore
and operations onSchemaManager
.