Uploaded image for project: 'Apache Airflow'
  1. Apache Airflow
  2. AIRFLOW-5342

Can't run initdb using Microsoft SQL server

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.10.4
    • Fix Version/s: 1.10.6
    • Component/s: configuration, core, database
    • Labels:
      None

      Description

      I'm using Microsoft SQL server 2016 as metadata db (for the sql_alchemy_conn), and pymssql as the Python driver.

      When running airflow initdb, airflow creates a table named `TaskInstance` with column `pool` that is initially Nullable (when the table is created).

      Later, an index named `ti_pool` on a few columns, including `pool` column in table `TaskInstance`.

      Then, airflow will try to alter table `TaskInstance` and change the column `pool` to `NOT NULL`.

      This does not work on Microsoft SQL Server since a column with an index defined on it cannot be changed, unless the index is deleted before.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mortenbpost Morten Post
                Reporter:
                AdamT Adam Trump
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: