Skip to content

Add "incomplete database" concept #39

Open
@aik099

Description

@aik099

As Code-Inside code is updated we might end up in a situation (e.g. introduced by a #37 or #38), where the sync command will discover more information about the code, than before. Since the actual scanned code base is the same, then:

  • the sync command won't rescan the code to pull missing data;
  • the bc command won't notice new/changed information in the database.

TODO:

  1. in a PHP/SQL migration script:
    1. figure out in which table the data is now incomplete (e.g. ClassMethods)
    2. if a FileId column is found in that table, then use its value
    3. otherwise trace back that table to the table with a FileId column (e.g. ClassMethods > Classes) and get the FileId value
    4. set 0 or -1 to the Files.Size column for files with the above-found IDs
  2. next time the sync runs it will reparse these files, because of a filesize difference and add all missing info to the database
  3. add the public KnowledgeBase::isIncomplete method, which would count records in the Files table that has Size=-1 or 0 and return true, when such records were found or false otherwise
  4. the bc command would call isIncomplete method on both databases and if throw an exception asking ti resync

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions