Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Migration_16_17.java « migration « persistence « notes « owncloud « niedermann « it « java « main « src « app - github.com/stefan-niedermann/nextcloud-notes.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b61262ebc19d399c7b5bf294c1ae790e354a2beb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package it.niedermann.owncloud.notes.persistence.migration;

import androidx.annotation.NonNull;
import androidx.room.migration.Migration;
import androidx.sqlite.db.SupportSQLiteDatabase;

public class Migration_16_17 extends Migration {

    public Migration_16_17() {
        super(16, 17);
    }

    /**
     * Adds a column to store the current scroll position per note
     * https://github.com/stefan-niedermann/nextcloud-notes/issues/227
     */
    @Override
    public void migrate(@NonNull SupportSQLiteDatabase db) {
        db.execSQL("ALTER TABLE NOTES ADD COLUMN SCROLL_Y INTEGER DEFAULT 0");
    }
}