I am trying to use flutter moor on my application. So after creating a column:
import 'package:moor_flutter/moor_flutter.dart';
@DataClassName("LocationTable")
class LocationTables extends Table {
TextColumn get locationUuid => text()();
RealColumn get latitude => real()();
Now I want to make locationUuid as index. So According it's official site I created a moor file to add index:
CREATE INDEX location_uuid_index ON LocationTables (locationUuid);
after that I added this file in db calss:
@UseMoor(include: {
'index.moor'
}, tables: [
UserTables,
LocationTables,
], daos: [
UserDao,
])
class Database extends _$Database {
But after run build runner:
pub run build_runner build --delete-conflicting-outputs
I got This error:
[WARNING] moor_generator:moor_generator on lib/database/database.dart:
line 3, column 37: Target table LocationTables could not be found.
╷
3 │ CREATE INDEX location_uuid_index ON LocationTables (locationUuid);