addSchemaMetaData static method

SchemaMetaData addSchemaMetaData(
  1. SchemaMetaData schemaMetaData
)

Implementation

static SchemaMetaData addSchemaMetaData(SchemaMetaData schemaMetaData) {
  schemaMetaData.addTable(UserStoreMixin.C_TABLE_ID, TABLE_NAME, uniqueKeysMap: {
    'id': ["id"],
    'email': ["email"]
  }, crcFieldNamesList: [
    'email',
    'name',
    'surname'
  ], propertiesMap: {
    'min-id-for-user': DbConstants.C_MEDIUMINT_USERSPACE_MIN,
    'index': 'id',
    'is-partition': false
  });
  schemaMetaData.addField(UserStoreMixin.C_TABLE_ID, 'id', FieldDataType.MEDIUMINT);
  schemaMetaData.addField(UserStoreMixin.C_TABLE_ID, 'email', FieldDataType.VARCHAR,
      notNull: false, fieldSize: 40);
  schemaMetaData.addField(UserStoreMixin.C_TABLE_ID, 'last_seen_ts', FieldDataType.INTEGER,
      notNull: false);
  schemaMetaData.addField(UserStoreMixin.C_TABLE_ID, 'name', FieldDataType.VARCHAR,
      fieldSize: 20, notNull: false);
  schemaMetaData.addField(UserStoreMixin.C_TABLE_ID, 'surname', FieldDataType.VARCHAR,
      fieldSize: 20, notNull: false);
  schemaMetaData.addField(
      UserStoreMixin.C_TABLE_ID, 'records_downloaded', FieldDataType.MEDIUMINT,
      notNull: false);
  schemaMetaData.addField(
      UserStoreMixin.C_TABLE_ID, 'changes_approved_count', FieldDataType.SMALLINT,
      notNull: false);
  schemaMetaData.addField(
      UserStoreMixin.C_TABLE_ID, 'changes_denied_count', FieldDataType.SMALLINT,
      notNull: false);
  return schemaMetaData;
}