谁能告诉我如何将默认值添加到迁移表中。我正在使用以下课程:
@Migration(version = PictureDatabase.VERSION, databaseName = PictureDatabase.NAME)
public class MigrationPicture extends AlterTableMigration<Picture> {
public MigrationPicture() {
super(Picture.class);
}
@Override
public void onPreMigrate() {
// Simple ALTER TABLE migration wraps the statements into a nice builder notation
super.onPreMigrate();
if(PictureDatabase.VERSION == 2) {
addColumn(String.class, Picture$Table.PICTURETYPE);
}
}
}
任何帮助将不胜感激。