private static void migrateFromBlacklistedToExcluded(@NonNull final SupportSQLiteDatabase database) {
        database.execSQL("CREATE TABLE `nodes_temp` " +
                "(timestamp INTEGER NOT NULL, " +
                "netKeys TEXT, " +
                "name TEXT, " +
                "ttl INTEGER DEFAULT 5, " +
                "excluded INTEGER NOT NULL, " +
                "secureNetworkBeacon INTEGER, " +
                "mesh_uuid TEXT, uuid TEXT NOT NULL, " +
                "security INTEGER NOT NULL, " +
                "unicast_address INTEGER NOT NULL DEFAULT 1, " +
                "configured INTEGER NOT NULL, " +
                "device_key BLOB, " +
                "seq_number INTEGER NOT NULL, " +
                "cid INTEGER, " +
                "pid INTEGER, " +
                "vid INTEGER, " +
                "crpl INTEGER, " +
                "elements TEXT, " +
                "appKeys TEXT, " +
                "networkTransmitCount INTEGER, " +
                "networkIntervalSteps INTEGER, " +
                "relayTransmitCount INTEGER, " +
                "relayIntervalSteps INTEGER, " +
                "friend INTEGER, " +
                "lowPower INTEGER, " +
                "proxy INTEGER, " +
                "relay INTEGER, " +
                "PRIMARY KEY(uuid), " +
                "FOREIGN KEY(mesh_uuid) REFERENCES mesh_network(mesh_uuid) ON UPDATE CASCADE ON DELETE CASCADE )");

        database.execSQL(
                "INSERT INTO nodes_temp (timestamp, netKeys, name, excluded, secureNetworkBeacon, mesh_uuid, " +
                        "security, unicast_address, configured, device_key, seq_number, cid, pid, vid, crpl, elements, " +
                        "appKeys, networkTransmitCount, networkIntervalSteps, relayTransmitCount, relayIntervalSteps, " +
                        "friend, lowPower, proxy, relay, uuid, mesh_uuid) " +
                        "SELECT timestamp, netKeys, name, blacklisted, secureNetworkBeacon, mesh_uuid, " +
                        "security, unicast_address, configured, device_key, seq_number, cid, pid, vid, crpl, mElements, " +
                        "appKeys, networkTransmitCount, networkIntervalSteps, relayTransmitCount, relayIntervalSteps," +
                        "friend, lowPower, proxy, relay, uuid, mesh_uuid FROM nodes");
        database.execSQL("DROP TABLE nodes");
        database.execSQL("ALTER TABLE nodes_temp RENAME TO nodes");
        database.execSQL("CREATE INDEX index_nodes_mesh_uuid ON `nodes` (mesh_uuid)");
    }
Override the onOpen method to populate the database.
For this sample, we clear the database every time it is created or opened.
<p>
If you want to populate the database only when the database is created for the 1st time,
override RoomDatabase.Callback()#onCreate
mesh/src/main/java/no/nordicsemi/android/mesh/MeshNetworkDb.java