Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1206

Add option to SchemaTool for ignoring unsupported tables

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Tools
    • Security Level: All
    • Labels:
      None

      Description

      I suggest adding a new feature to SchemaTool, which allows you to ignore tables, which contain unsupported column types.

      Use case:

      • You have a legacy database, or a database that is also shared with another application
      • You want to use SchemaTool to speed up development
      • The database contains tables which are not used in the Doctrine 2 application, and contain unsupported column types

      I've encountered this already a few times myself - Basically if you try to use orm:schema-tool:update with a database that contains tables with unsupported column types, it'll throw an error and you won't be able to use it at all. Because schema tool is extermely convenient when developing, I think it would be very useful to have support for this feature.

      Implementation:

      I think this should be doable by just changing SchemaTool/SchemaManager so, that SchemaManager would contain an additional method (or flag) which works like createSchema, but ignores tables that cause an exception, and SchemaTool would include a flag for using this instead of the standard approach.

      I'm looking into implementing this myself, and will submit a patch if this seems like a reasonable approach.

        Activity

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Jani Hartikainen
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: