I am unable to upgrade the database with List<String> photos; in the class.
The generated migration file shows the type as null.
Future upgrade() async { database.addColumn("_Listing", SchemaColumn("photos", null, isPrimaryKey: false, autoincrement: false, isIndexed: false, isNullable: false, isUnique: false)); }
I changed the class to specify the type.
@Column(databaseType: ManagedPropertyType.list)List<String> photos;
but the migration file was the same.
I updated the migration file manually and still am unable to upgrade the database.
Future upgrade() async { database.addColumn("_Listing", SchemaColumn("photos", ManagedPropertyType.list, isPrimaryKey: false, autoincrement: false, isIndexed: false, isNullable: false, isUnique: false)); }
Here is the error:
ALTER TABLE _Listing ADD COLUMN photos null NOT NULL
*** There was an issue. Reason: syntax error at or near "null". Table: null Column: null
I am unable to upgrade the database with
List<String> photos;
in the class.The generated migration file shows the type as null.
Future upgrade() async { database.addColumn("_Listing", SchemaColumn("photos", null, isPrimaryKey: false, autoincrement: false, isIndexed: false, isNullable: false, isUnique: false)); }
I changed the class to specify the type.
@Column(databaseType: ManagedPropertyType.list)
List<String> photos;
but the migration file was the same.
I updated the migration file manually and still am unable to upgrade the database.
Future upgrade() async { database.addColumn("_Listing", SchemaColumn("photos", ManagedPropertyType.list, isPrimaryKey: false, autoincrement: false, isIndexed: false, isNullable: false, isUnique: false)); }
Here is the error: ALTER TABLE _Listing ADD COLUMN photos null NOT NULL *** There was an issue. Reason: syntax error at or near "null". Table: null Column: null