mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-18 16:25:27 +02:00
Fix migration
This commit is contained in:
parent
768356020e
commit
19f1f436c3
@ -2,7 +2,7 @@
|
||||
"formatVersion": 1,
|
||||
"database": {
|
||||
"version": 2,
|
||||
"identityHash": "ab71572ff5556256d1f042af36243f6f",
|
||||
"identityHash": "d5dca9e0346c3400b7ff5b31e85c7827",
|
||||
"entities": [
|
||||
{
|
||||
"tableName": "units",
|
||||
@ -34,10 +34,10 @@
|
||||
}
|
||||
],
|
||||
"primaryKey": {
|
||||
"autoGenerate": false,
|
||||
"columnNames": [
|
||||
"unitId"
|
||||
]
|
||||
],
|
||||
"autoGenerate": false
|
||||
},
|
||||
"indices": [],
|
||||
"foreignKeys": []
|
||||
@ -72,42 +72,10 @@
|
||||
}
|
||||
],
|
||||
"primaryKey": {
|
||||
"autoGenerate": true,
|
||||
"columnNames": [
|
||||
"entityId"
|
||||
]
|
||||
},
|
||||
"indices": [],
|
||||
"foreignKeys": []
|
||||
},
|
||||
{
|
||||
"tableName": "time_zones",
|
||||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `position` INTEGER NOT NULL, `label` TEXT NOT NULL, PRIMARY KEY(`id`))",
|
||||
"fields": [
|
||||
{
|
||||
"fieldPath": "id",
|
||||
"columnName": "id",
|
||||
"affinity": "TEXT",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "position",
|
||||
"columnName": "position",
|
||||
"affinity": "INTEGER",
|
||||
"notNull": true
|
||||
},
|
||||
{
|
||||
"fieldPath": "label",
|
||||
"columnName": "label",
|
||||
"affinity": "TEXT",
|
||||
"notNull": true
|
||||
}
|
||||
],
|
||||
"primaryKey": {
|
||||
"autoGenerate": false,
|
||||
"columnNames": [
|
||||
"id"
|
||||
]
|
||||
],
|
||||
"autoGenerate": true
|
||||
},
|
||||
"indices": [],
|
||||
"foreignKeys": []
|
||||
@ -116,7 +84,7 @@
|
||||
"views": [],
|
||||
"setupQueries": [
|
||||
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
|
||||
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'ab71572ff5556256d1f042af36243f6f')"
|
||||
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'd5dca9e0346c3400b7ff5b31e85c7827')"
|
||||
]
|
||||
}
|
||||
}
|
@ -56,16 +56,17 @@ class UnittoDatabaseModule {
|
||||
return unittoDatabase.calculatorHistoryDao()
|
||||
}
|
||||
|
||||
/**
|
||||
* Tells Hilt to use this method to get [TimeZoneDao]
|
||||
*
|
||||
* @param unittoDatabase Database for which we need DAO
|
||||
* @return Singleton of [TimeZoneDao]
|
||||
*/
|
||||
@Provides
|
||||
fun provideTimeZoneDao(unittoDatabase: UnittoDatabase): TimeZoneDao {
|
||||
return unittoDatabase.timeZoneDao()
|
||||
}
|
||||
// For some reason this fucks up the migration
|
||||
// /**
|
||||
// * Tells Hilt to use this method to get [TimeZoneDao]
|
||||
// *
|
||||
// * @param unittoDatabase Database for which we need DAO
|
||||
// * @return Singleton of [TimeZoneDao]
|
||||
// */
|
||||
// @Provides
|
||||
// fun provideTimeZoneDao(unittoDatabase: UnittoDatabase): TimeZoneDao {
|
||||
// return unittoDatabase.timeZoneDao()
|
||||
// }
|
||||
|
||||
/**
|
||||
* Tells Hilt to use this method to get [UnittoDatabase]
|
||||
|
Loading…
x
Reference in New Issue
Block a user