MTable constructor

MTable({
  1. required String name,
  2. required List<MField> fields,
  3. List<ForeignKey> foreignKeys = const [],
  4. String charset = 'utf8mb4',
  5. String collation = 'utf8mb4_unicode_ci',
})

Creates a new MySQL table definition.

name is the table name (required) fields is the list of table fields/columns (required) foreignKeys is the list of foreign key constraints (optional, defaults to empty list) charset is the character set for the table (optional, defaults to 'utf8mb4') collation is the collation for the table (optional, defaults to 'utf8mb4_unicode_ci')

Implementation

MTable({
  required this.name,
  required this.fields,
  this.foreignKeys = const [],
  this.charset = 'utf8mb4',
  this.collation = 'utf8mb4_unicode_ci',
});