Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c392f9b9 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Export database schema

parent 34837aca
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
    alias(libs.plugins.android.application)
    alias(libs.plugins.androidx.room)
    alias(libs.plugins.kotlin.android)
    alias(libs.plugins.ksp)
}
@@ -61,6 +62,10 @@ android {
        buildConfig = true
        viewBinding = true
    }

    room {
        schemaDirectory("$projectDir/schemas")
    }
}

dependencies {
+66 −0
Original line number Diff line number Diff line
{
  "formatVersion": 1,
  "database": {
    "version": 2,
    "identityHash": "d69e1dfdf2d0d3de32720f02cded727a",
    "entities": [
      {
        "tableName": "pwa",
        "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `shortcutId` TEXT NOT NULL, `url` TEXT NOT NULL, `title` TEXT NOT NULL, `icon` BLOB NOT NULL)",
        "fields": [
          {
            "fieldPath": "id",
            "columnName": "_id",
            "affinity": "INTEGER",
            "notNull": true
          },
          {
            "fieldPath": "shortcutId",
            "columnName": "shortcutId",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "url",
            "columnName": "url",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "title",
            "columnName": "title",
            "affinity": "TEXT",
            "notNull": true
          },
          {
            "fieldPath": "iconBlob",
            "columnName": "icon",
            "affinity": "BLOB",
            "notNull": true
          }
        ],
        "primaryKey": {
          "autoGenerate": true,
          "columnNames": [
            "_id"
          ]
        },
        "indices": [
          {
            "name": "index_pwa_shortcutId",
            "unique": true,
            "columnNames": [
              "shortcutId"
            ],
            "orders": [],
            "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_pwa_shortcutId` ON `${TABLE_NAME}` (`shortcutId`)"
          }
        ]
      }
    ],
    "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, 'd69e1dfdf2d0d3de32720f02cded727a')"
    ]
  }
}
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -31,5 +31,6 @@ androidx-test-espresso-core = { module = "androidx.test.espresso:espresso-core",

[plugins]
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
androidx-room = { id = "androidx.room", version.ref = "androidxRoom" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }