anchor.diff:  
         type = 'view';
         data = {
  -        'name': entity.name,
  -        'sql': entity.createSql(const DriftOptions.defaults()),
  -        'dart_data_name': entity.dartTypeName,
  +        'name': entity.schemaName,
  +        'sql': source.createView,
  +        'dart_data_name': entity.nameOfRowClass,
           'dart_info_name': entity.entityInfoName,
           'columns': [for (final column in entity.columns) _columnData(column)],
         };
  -    } else if (entity is SpecialQuery) {
  +    } else if (entity is DefinedSqlQuery && entity.mode == QueryMode.atCreate) {
         type = 'special-query';
         data = {
           'scenario': 'create',
  
positive.code:     final nullable = data['nullable'] as bool;
      final customConstraints = data['customConstraints'] as String?;
      final defaultConstraints = data['defaultConstraints'] as String?;
      final dslFeatures = [
        for (final feature in data['dsl_features'] as List<dynamic>)
          _columnFeature(feature),
        if (defaultConstraints != null)
          DefaultConstraintsFromSchemaFile(defaultConstraints),
      ];
      final getterName = data['getter_name'] as String?;
  
      // Note: Not including client default code because that usually depends on
      // imports from the database.
      return DriftColumn(
        name: ColumnName.explicitly(name),
        dartGetterName: getterName ?? ReCase(name).camelCase,
        type: columnType,
        nullable: nullable,
        defaultArgument: data['default_dart'] as String?,
        customConstraints: customConstraints,
        features: dslFeatures.whereType<ColumnFeature>().toList(),
      );
    }
  
    ColumnFeature? _columnFeature(dynamic data) {
      if (data == 'auto-increment') return AutoIncrement();
      if (data == 'primary-key') return const PrimaryKey();
  
      if (data is Map<String, dynamic>) {
        final allowedLengths = data['allowed-lengths'] as Map<String, dynamic>;
  
negative.code:     _rawById.keys.forEach(_processById);
    }
  
    T _existingEntity<T extends DriftElement>(dynamic id) {
      return _entitiesById[id as int] as T;
    }
  
    DriftElementId _id(String name) => DriftElementId(_elementUri, name);
  
    DriftDeclaration get _declaration =>
        DriftDeclaration(_elementUri, -1, '<unknown>');
  
    void _processById(int id) {
      if (_entitiesById.containsKey(id)) return;
  