Skip to content

Schema information inserted every run into some fixture files. #344

@kwerle

Description

@kwerle

Using annotaterb directly from github main branch (so that I get before_doc)

Steps to reproduce the problem

bundle exec annotaterb models --force

Expected behavior

It should not insert another copy of the schema every run.

Actual behavior

It inserts another copy of the schema every run!
This only happens to about 1% of our fixtures (4/300+)

Your .annotaterb.yml configuration

---
active_admin: false
additional_file_patterns: []
routes: false
models: true
position_in_routes: before_doc
position_in_class: before_doc
position_in_test: before_doc
position_in_fixture: before_doc
position_in_factory: before_doc
position_in_serializer: before_doc
show_foreign_keys: true
show_complete_foreign_keys: false
show_indexes: true
simple_indexes: false
model_dir:
  - app/models
root_dir:
  - ""
include_version: false
require: []
exclude_tests: false
exclude_fixtures: false
exclude_factories: false
exclude_serializers: false
exclude_scaffolds: true
exclude_controllers: true
exclude_helpers: true
exclude_sti_subclasses: false
ignore_model_sub_dir: false
ignore_columns:
ignore_routes:
ignore_unknown_models: false
hide_limit_column_types: integer,bigint,boolean
hide_default_column_types: json,jsonb,hstore
skip_on_db_migrate: false
format_bare: true
format_rdoc: false
format_yard: false
format_markdown: false
sort: false
force: false
frozen: <%= !ENV["TESTING_ANNOTATED_MODELS"].to_s.empty? %>
classified_sort: true
trace: false
wrapper_open:
wrapper_close:
with_comment: true

Environment

  • AnnotateRb version:
  • Ruby version: 4.0
  • Ruby on Rails version: 8.0
  • Database adapter (e.g., sqlite3, pg, mysql2): mysql2
  • Database adapter version: mysql2 (0.5.6)

Attached is the fixture file which is pretty boring.

inventory_event_field_pick_list_values.yml

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions