[
https://issues.apache.org/jira/browse/AIRFLOW-2606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16528736#comment-16528736
]
ASF subversion and git services commented on AIRFLOW-2606:
----------------------------------------------------------
Commit 54da3eaf175b0224a7d6e09f57dc6278293937d0 in incubator-airflow's branch
refs/heads/v1-10-test from [~seelmann]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-airflow.git;h=54da3ea ]
[AIRFLOW-2606] Fix DB schema and SQLAlchemy model
* Add test that verifies that database schema and SQLAlchemy model are in sync
* Add exception for users.password that doesn't exist in model and tables
created by other tests
* Add migration script to merge the two heads
* Add migration script to fix not-null constrains for MySQL that were lost by
0e2a74e0fc9f_add_time_zone_awareness
* Add migration script to fix FK constraint for existing SQLite DBs
* Enable ForeignKey support for SQLite, otherwise
2e82aab8ef20_rename_user_table won't change FK in chart and known_event tables
(cherry picked from commit 680651f0ae2a314f8e9882a6bc38f4fa3795cdbe)
Signed-off-by: Bolke de Bruin <[email protected]>
> Test needed to ensure database schema always match SQLAlchemy model types
> -------------------------------------------------------------------------
>
> Key: AIRFLOW-2606
> URL: https://issues.apache.org/jira/browse/AIRFLOW-2606
> Project: Apache Airflow
> Issue Type: Improvement
> Reporter: Joy Gao
> Assignee: Stefan Seelmann
> Priority: Major
> Fix For: 2.0.0
>
>
> An issue was discovered by [this
> PR|https://github.com/apache/incubator-airflow/pull/3492#issuecomment-396815203]
> where database schema does not match its corresponding SQLAlchemy model
> declaration. We should add generic unit test for this to prevent similar bugs
> from occurring in the future. (Alternatively, we can add the policing logic
> to `airflow upgradedb` command so each migrations can do the check)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)