-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Migrate from id to guid #319
Comments
!!! ATTENTION !!! This commit wipes all database data! + This change is necessary because IDs will no longer be based on numeric characters in the future. Instead a UUID, containing alpha-numeric characters will be used. + This replaces the Session#sessionId value with the value of the "guid" attribute parsed from "event" node. The formerly used "id" attribute turned out to hold identical values for different sessions. Resolves #319. + Fix column type of "session_id" in alarms and highlight tables from INTEGER to TEXT to allow storing "guid" values. + Increase database versions. + Update sample data in tests. Additional changes - The following changes are committed here to subsume them as an atomic database schema change. + Rename sessions database and table to reflect current project wording (lectures -> sessions). See issue #250. + Rename database column in the alarms, highlight and sessions tables to reflect the current project naming (event -> session). + A database index is created for the sessions table to improve query performance. + Database column types in the alarms and session tables are corrected. This resolves issues where leading zeros are lost on this columns. Resolves #5.
!!! ATTENTION !!! This commit wipes all database data! + This change is necessary because IDs will no longer be based on numeric characters in the future. Instead a UUID, containing alpha-numeric characters will be used. + This replaces the Session#sessionId value with the value of the "guid" attribute parsed from "event" node. The formerly used "id" attribute turned out to hold identical values for different sessions. Resolves #319. + Fix column type of "session_id" in alarms and highlight tables from INTEGER to TEXT to allow storing "guid" values. + Increase database versions. + Update sample data in tests. Additional changes - The following changes are committed here to subsume them as an atomic database schema change. + Rename sessions database and table to reflect current project wording (lectures -> sessions). See issue #250. + Rename database column in the alarms, highlight and sessions tables to reflect the current project naming (event -> session). + A database index is created for the sessions table to improve query performance. + Database column types in the alarms and session tables are corrected. This resolves issues where leading zeros are lost on this columns. Resolves #5.
@NiciDieNase Can you tell if the JSON import in the Chaosflix app will be broken when I move from |
I think a better approach would be to use an auto-incrementing INTEGER column to uniquely identify a session in the database. This will keep the app simple in situations where stable numeric identifiers are required or at least very helpful (e.g. in a This way only the code that maps between network model and app model has to be aware of GUIDs. If the identifier in the network format changes in the future only the mapping code needs to be updated. Using that approach also allows splitting this change into two parts:
|
!!! ATTENTION !!! This commit wipes all database data! + This change is necessary because IDs will no longer be based on numeric characters in the future. Instead a UUID, containing alpha-numeric characters will be used. + This replaces the Session#sessionId value with the value of the "guid" attribute parsed from "event" node. The formerly used "id" attribute turned out to hold identical values for different sessions. Resolves #319. + Fix column type of "session_id" in alarms and highlight tables from INTEGER to TEXT to allow storing "guid" values. + Increase database versions. + Update sample data in tests. Additional changes - The following changes are committed here to subsume them as an atomic database schema change. + Rename sessions database and table to reflect current project wording (lectures -> sessions). See issue #250. + Rename database column in the alarms, highlight and sessions tables to reflect the current project naming (event -> session). + A database index is created for the sessions table to improve query performance. + Database column types in the alarms and session tables are corrected. This resolves issues where leading zeros are lost on this columns. Resolves #5.
!!! ATTENTION !!! This commit wipes all database data! + This change is necessary because IDs will no longer be based on numeric characters in the future. Instead a UUID, containing alpha-numeric characters will be used. + This replaces the Session#sessionId value with the value of the "guid" attribute parsed from "event" node. The formerly used "id" attribute turned out to hold identical values for different sessions. Resolves #319. + Fix column type of "session_id" in alarms and highlight tables from INTEGER to TEXT to allow storing "guid" values. + Increase database versions. + Update sample data in tests. Additional changes - The following changes are committed here to subsume them as an atomic database schema change. + Rename sessions database and table to reflect current project wording (lectures -> sessions). See issue #250. + Rename database column in the alarms, highlight and sessions tables to reflect the current project naming (event -> session). + A database index is created for the sessions table to improve query performance. + Database column types in the alarms and session tables are corrected. This resolves issues where leading zeros are lost on this columns. Resolves #5.
!!! ATTENTION !!! This commit wipes all database data! + This change is necessary because IDs will no longer be based on numeric characters in the future. Instead a UUID, containing alpha-numeric characters will be used. + This replaces the Session#sessionId value with the value of the "guid" attribute parsed from "event" node. The formerly used "id" attribute turned out to hold identical values for different sessions. Resolves #319. + Fix column type of "session_id" in alarms and highlight tables from INTEGER to TEXT to allow storing "guid" values. + Increase database versions. + Update sample data in tests. Additional changes - The following changes are committed here to subsume them as an atomic database schema change. + Rename sessions database and table to reflect current project wording (lectures -> sessions). See issue #250. + Rename database column in the alarms, highlight and sessions tables to reflect the current project naming (event -> session). + A database index is created for the sessions table to improve query performance. + Database column types in the alarms and session tables are corrected. This resolves issues where leading zeros are lost on this columns. Resolves #5.
!!! ATTENTION !!! This commit wipes all database data! + This change is necessary because IDs will no longer be based on numeric characters in the future. Instead a UUID, containing alpha-numeric characters will be used. + This replaces the Session#sessionId value with the value of the "guid" attribute parsed from "event" node. The formerly used "id" attribute turned out to hold identical values for different sessions. Resolves #319. + Fix column type of "session_id" in alarms and highlight tables from INTEGER to TEXT to allow storing "guid" values. + Increase database versions. + Update sample data in tests. Additional changes - The following changes are committed here to subsume them as an atomic database schema change. + Rename sessions database and table to reflect current project wording (lectures -> sessions). See issue #250. + Rename database column in the alarms, highlight and sessions tables to reflect the current project naming (event -> session). + A database index is created for the sessions table to improve query performance. + Database column types in the alarms and session tables are corrected. This resolves issues where leading zeros are lost on this columns. Resolves #5.
!!! ATTENTION !!! This commit wipes all database data! + This change is necessary because IDs will no longer be based on numeric characters in the future. Instead a UUID, containing alpha-numeric characters will be used. + This replaces the Session#sessionId value with the value of the "guid" attribute parsed from "event" node. The formerly used "id" attribute turned out to hold identical values for different sessions. Resolves #319. + Fix column type of "session_id" in alarms and highlight tables from INTEGER to TEXT to allow storing "guid" values. + Increase database versions. + Update sample data in tests. Additional changes - The following changes are committed here to subsume them as an atomic database schema change. + Rename sessions database and table to reflect current project wording (lectures -> sessions). See issue #250. + Rename database column in the alarms, highlight and sessions tables to reflect the current project naming (event -> session). + A database index is created for the sessions table to improve query performance. + Database column types in the alarms and session tables are corrected. This resolves issues where leading zeros are lost on this columns. Resolves #5.
!!! ATTENTION !!! This commit wipes all database data! + This change is necessary because IDs will no longer be based on numeric characters in the future. Instead a UUID, containing alpha-numeric characters will be used. + This replaces the Session#sessionId value with the value of the "guid" attribute parsed from "event" node. The formerly used "id" attribute turned out to hold identical values for different sessions. Resolves #319. + Fix column type of "session_id" in alarms and highlight tables from INTEGER to TEXT to allow storing "guid" values. + Increase database versions. + Update sample data in tests. Additional changes - The following changes are committed here to subsume them as an atomic database schema change. + Rename sessions database and table to reflect current project wording (lectures -> sessions). See issue #250. + Rename database column in the alarms, highlight and sessions tables to reflect the current project naming (event -> session). + A database index is created for the sessions table to improve query performance. + Database column types in the alarms and session tables are corrected. This resolves issues where leading zeros are lost on this columns. Resolves #5.
🧑🚒 This has become top priority because the merged schedule data for the upcoming rc3 will not contain |
I extended the information in the "current state" section 👆 to clarify the currently used mechanism. |
No, should not be affected, chaoflix uses guid for importing. |
@cketti The work-in-progress of a new implementation can be found on the |
🔈 Update 24.12.2020
|
@johnjohndoe Whats the current state of this issue? |
@saerdnaer Paused. I will pick up work on the topic again in October 2021. |
@saerdnaer I haven't been able to continue here. I likely have to stick to IDs for rC3.rev2. |
Current state
id
XML attribute is parsed from the schedule XML and used with the app.PendingIntent
inAlarmServices
.PendingIntent
inAlarmReceiver
.id
values are not guaranteed to be unique -id
values used for different sessions cause errors. See Duplicate event ids (36C3, GPN22) voc/schedule#63.ScheduleChanges
class.SessionsDatabaseRepository#insert
.Target state
guid
XML attribute is parsed from the schedule XML and used with the app.Preparation
sessionId
as anInteger
inAlarmServices
to compose aPendingIntent
.sessionId
being used as anInteger
inAlarmReceiver#onReceive
to compose aPendingIntent
.Highlight#sessionId
fromInt
toString
. SeeHighlightDBOpenHelper
.TODOs
guid
XML attribute.guid
within the app.id
XML attribute can be removed. -> Removed.SessionUrlComposer
and related tests.guid
value? -> No value for the user.id
toguid
.Related
The text was updated successfully, but these errors were encountered: