mirror of
https://github.com/Myzel394/NumberHub.git
synced 2025-06-19 00:35:26 +02:00
Fix migration
This commit is contained in:
parent
768356020e
commit
19f1f436c3
@ -2,7 +2,7 @@
|
|||||||
"formatVersion": 1,
|
"formatVersion": 1,
|
||||||
"database": {
|
"database": {
|
||||||
"version": 2,
|
"version": 2,
|
||||||
"identityHash": "ab71572ff5556256d1f042af36243f6f",
|
"identityHash": "d5dca9e0346c3400b7ff5b31e85c7827",
|
||||||
"entities": [
|
"entities": [
|
||||||
{
|
{
|
||||||
"tableName": "units",
|
"tableName": "units",
|
||||||
@ -34,10 +34,10 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"primaryKey": {
|
"primaryKey": {
|
||||||
"autoGenerate": false,
|
|
||||||
"columnNames": [
|
"columnNames": [
|
||||||
"unitId"
|
"unitId"
|
||||||
]
|
],
|
||||||
|
"autoGenerate": false
|
||||||
},
|
},
|
||||||
"indices": [],
|
"indices": [],
|
||||||
"foreignKeys": []
|
"foreignKeys": []
|
||||||
@ -72,42 +72,10 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"primaryKey": {
|
"primaryKey": {
|
||||||
"autoGenerate": true,
|
|
||||||
"columnNames": [
|
"columnNames": [
|
||||||
"entityId"
|
"entityId"
|
||||||
]
|
],
|
||||||
},
|
"autoGenerate": true
|
||||||
"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"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"indices": [],
|
"indices": [],
|
||||||
"foreignKeys": []
|
"foreignKeys": []
|
||||||
@ -116,7 +84,7 @@
|
|||||||
"views": [],
|
"views": [],
|
||||||
"setupQueries": [
|
"setupQueries": [
|
||||||
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
|
"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()
|
return unittoDatabase.calculatorHistoryDao()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// For some reason this fucks up the migration
|
||||||
* Tells Hilt to use this method to get [TimeZoneDao]
|
// /**
|
||||||
*
|
// * Tells Hilt to use this method to get [TimeZoneDao]
|
||||||
* @param unittoDatabase Database for which we need DAO
|
// *
|
||||||
* @return Singleton of [TimeZoneDao]
|
// * @param unittoDatabase Database for which we need DAO
|
||||||
*/
|
// * @return Singleton of [TimeZoneDao]
|
||||||
@Provides
|
// */
|
||||||
fun provideTimeZoneDao(unittoDatabase: UnittoDatabase): TimeZoneDao {
|
// @Provides
|
||||||
return unittoDatabase.timeZoneDao()
|
// fun provideTimeZoneDao(unittoDatabase: UnittoDatabase): TimeZoneDao {
|
||||||
}
|
// return unittoDatabase.timeZoneDao()
|
||||||
|
// }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tells Hilt to use this method to get [UnittoDatabase]
|
* Tells Hilt to use this method to get [UnittoDatabase]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user