schema method

void schema()

Override this method to fluently define the model's database schema.

Example:

@override
String get tableName => 'blog_posts';

@override
void schema() {
  string('title', length: 255);
  string('slug', isUnique: true);
  text('content');
  json('tagIds', isNullable: true);
  string('status', defaultValue: 'draft');
}

Implementation

void schema() {}