Skip to content

Commit

Permalink
-- Set Up Existing Services to recall services*DONE*
Browse files Browse the repository at this point in the history
-- Make Add button close activity for Add vehicle*DONE*
-- Make Existing Vehicle clickable to summon services*DONE*
-- Delete Functions *DONE*
  • Loading branch information
FlapjackStaxx committed Mar 1, 2022
1 parent 68a6261 commit ae76b1f
Show file tree
Hide file tree
Showing 19 changed files with 552 additions and 538 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
{
"formatVersion": 1,
"database": {
"version": 2,
"identityHash": "81b119ab0f2a325d95a58d32420f4408",
"entities": [
{
"tableName": "Vehicle",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`vehicleId` INTEGER PRIMARY KEY AUTOINCREMENT, `vehicleYear` TEXT NOT NULL, `vehicleMake` TEXT NOT NULL, `vehicleModel` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "vehicleId",
"columnName": "vehicleId",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "vehicleYear",
"columnName": "vehicleYear",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "vehicleMake",
"columnName": "vehicleMake",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "vehicleModel",
"columnName": "vehicleModel",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"vehicleId"
],
"autoGenerate": true
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "Service",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`serviceId` INTEGER PRIMARY KEY AUTOINCREMENT, `vehicleId` INTEGER NOT NULL, `serviceDate` TEXT NOT NULL, `serviceMiles` TEXT NOT NULL, `serviceType` TEXT NOT NULL, `serviceNotes` TEXT NOT NULL, FOREIGN KEY(`vehicleId`) REFERENCES `Vehicle`(`vehicleId`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "serviceId",
"columnName": "serviceId",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "vehicleId",
"columnName": "vehicleId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "serviceDate",
"columnName": "serviceDate",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "serviceMiles",
"columnName": "serviceMiles",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "serviceType",
"columnName": "serviceType",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "serviceNotes",
"columnName": "serviceNotes",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"serviceId"
],
"autoGenerate": true
},
"indices": [],
"foreignKeys": [
{
"table": "Vehicle",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"vehicleId"
],
"referencedColumns": [
"vehicleId"
]
}
]
},
{
"tableName": "VehicleServiceCrossRef",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`vehicleId` INTEGER NOT NULL, `serviceId` INTEGER NOT NULL, PRIMARY KEY(`vehicleId`, `serviceId`))",
"fields": [
{
"fieldPath": "vehicleId",
"columnName": "vehicleId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "serviceId",
"columnName": "serviceId",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"vehicleId",
"serviceId"
],
"autoGenerate": false
},
"indices": [],
"foreignKeys": []
}
],
"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, '81b119ab0f2a325d95a58d32420f4408')"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
{
"formatVersion": 1,
"database": {
"version": 3,
"identityHash": "81b119ab0f2a325d95a58d32420f4408",
"entities": [
{
"tableName": "Vehicle",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`vehicleId` INTEGER PRIMARY KEY AUTOINCREMENT, `vehicleYear` TEXT NOT NULL, `vehicleMake` TEXT NOT NULL, `vehicleModel` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "vehicleId",
"columnName": "vehicleId",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "vehicleYear",
"columnName": "vehicleYear",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "vehicleMake",
"columnName": "vehicleMake",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "vehicleModel",
"columnName": "vehicleModel",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"vehicleId"
],
"autoGenerate": true
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "Service",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`serviceId` INTEGER PRIMARY KEY AUTOINCREMENT, `vehicleId` INTEGER NOT NULL, `serviceDate` TEXT NOT NULL, `serviceMiles` TEXT NOT NULL, `serviceType` TEXT NOT NULL, `serviceNotes` TEXT NOT NULL, FOREIGN KEY(`vehicleId`) REFERENCES `Vehicle`(`vehicleId`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "serviceId",
"columnName": "serviceId",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "vehicleId",
"columnName": "vehicleId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "serviceDate",
"columnName": "serviceDate",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "serviceMiles",
"columnName": "serviceMiles",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "serviceType",
"columnName": "serviceType",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "serviceNotes",
"columnName": "serviceNotes",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"serviceId"
],
"autoGenerate": true
},
"indices": [],
"foreignKeys": [
{
"table": "Vehicle",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"vehicleId"
],
"referencedColumns": [
"vehicleId"
]
}
]
},
{
"tableName": "VehicleServiceCrossRef",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`vehicleId` INTEGER NOT NULL, `serviceId` INTEGER NOT NULL, PRIMARY KEY(`vehicleId`, `serviceId`))",
"fields": [
{
"fieldPath": "vehicleId",
"columnName": "vehicleId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "serviceId",
"columnName": "serviceId",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"columnNames": [
"vehicleId",
"serviceId"
],
"autoGenerate": false
},
"indices": [],
"foreignKeys": []
}
],
"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, '81b119ab0f2a325d95a58d32420f4408')"
]
}
}

0 comments on commit ae76b1f

Please sign in to comment.