[core] Invert dependency list and merge migrations

Review Request #4358 — Created May 15, 2014 and submitted

abec
old-hue-rw
hue
enricoberti, romain
commit b8380859eed16fdf9b2a4e6b916cdce7b25e0662
Author: Abraham Elmahrek <abraham@elmahrek.com>
Date:   Thu May 15 18:10:29 2014 -0400

    [core] Invert dependency list and merge migrations
    
    Merging migration history will make it seem as though desktop/0007
    ran first, but it will actually run after beeswax/0008, oozie/0025,
    and pig/0001 when these apps are available. During the build process,
    sycndb and migrate commands are ran before the apps are installed,
    but after desktop is installed. So desktop/0007 will run first there.
    Then, after the apps are installed, syncdb and migrate are executed
    again. Here, the proper order will be respected.

:100644 100644 2938271... a8a5b72... M	apps/beeswax/src/beeswax/migrations/0008_auto__add_field_queryhistory_query_type.py
:100644 100644 a198c58... e83e5c2... M	apps/oozie/src/oozie/migrations/0025_change_examples_path_format.py
:100644 100644 45be66f... 8015b8e... M	apps/pig/src/pig/migrations/0001_initial.py
:100644 100644 aadf3b1... cc7631f... M	desktop/Makefile
:100644 100644 1fe4d95... cce8416... M	desktop/core/src/desktop/migrations/0007_auto__add_documentpermission__add_documenttag__add_document.py
:100644 100644 460db05... 83d2fb5... M	tools/app_reg/build.py
Tested manually with sqlite and postgresql 8.4.

Here is what the migration history looks like: 
sqlite> SELECT * FROM south_migrationhistory;
1|desktop|0001_initial|2014-05-15 15:08:26.960559
2|desktop|0002_add_groups_and_homedirs|2014-05-15 15:08:26.963524
3|desktop|0003_group_permissions|2014-05-15 15:08:26.966502
4|desktop|0004_grouprelations|2014-05-15 15:08:26.970546
5|desktop|0005_settings|2014-05-15 15:08:26.987621
6|desktop|0006_settings_add_tour|2014-05-15 15:08:27.010595
7|desktop|0007_auto__add_documentpermission__add_documenttag__add_document|2014-05-15 15:08:27.081176
8|pig|0001_initial|2014-05-15 15:09:55.471717
9|oozie|0001_initial|2014-05-15 15:09:55.596942
10|oozie|0002_auto__add_hive|2014-05-15 15:09:55.642643
11|oozie|0003_auto__add_sqoop|2014-05-15 15:09:55.685761
12|oozie|0004_auto__add_ssh|2014-05-15 15:09:55.729593
13|oozie|0005_auto__add_shell|2014-05-15 15:09:55.780879
14|oozie|0006_auto__chg_field_java_files__chg_field_java_archives__chg_field_sqoop_f|2014-05-15 15:09:55.934401
15|oozie|0007_auto__chg_field_sqoop_script_path|2014-05-15 15:09:55.997486
16|oozie|0008_auto__add_distcp|2014-05-15 15:09:56.044914
17|oozie|0009_auto__add_decision|2014-05-15 15:09:56.140177
18|oozie|0010_auto__add_fs|2014-05-15 15:09:56.194360
19|oozie|0011_auto__add_email|2014-05-15 15:09:56.248026
20|oozie|0012_auto__add_subworkflow__chg_field_email_subject__chg_field_email_body|2014-05-15 15:09:56.319322
21|oozie|0013_auto__add_generic|2014-05-15 15:09:56.381559
22|oozie|0014_auto__add_decisionend|2014-05-15 15:09:56.435275
23|oozie|0015_auto__add_field_dataset_advanced_start_instance__add_field_dataset_ins|2014-05-15 15:09:56.522823
24|oozie|0016_auto__add_field_coordinator_job_properties|2014-05-15 15:09:56.589307
25|oozie|0017_auto__add_bundledcoordinator__add_bundle|2014-05-15 15:09:56.656425
26|oozie|0018_auto__add_field_workflow_managed|2014-05-15 15:09:56.730752
27|oozie|0019_auto__add_field_java_capture_output|2014-05-15 15:09:56.798489
28|oozie|0020_chg_large_varchars_to_textfields|2014-05-15 15:09:56.865582
29|oozie|0021_auto__chg_field_java_args__add_field_job_is_trashed|2014-05-15 15:09:56.942951
30|oozie|0022_auto__chg_field_mapreduce_node_ptr__chg_field_start_node_ptr|2014-05-15 15:09:57.032698
31|oozie|0023_auto__add_field_node_data__add_field_job_data|2014-05-15 15:09:57.127556
32|oozie|0024_auto__chg_field_subworkflow_sub_workflow|2014-05-15 15:09:57.202301
33|oozie|0025_change_examples_path_format|2014-05-15 15:09:57.271193
34|beeswax|0001_initial|2014-05-15 15:09:57.302996
35|beeswax|0002_auto__add_field_queryhistory_notify|2014-05-15 15:09:57.332278
36|beeswax|0003_auto__add_field_queryhistory_server_name__add_field_queryhistory_serve|2014-05-15 15:09:57.380745
37|beeswax|0004_auto__add_session__add_field_queryhistory_server_type__add_field_query|2014-05-15 15:09:57.441892
38|beeswax|0005_auto__add_field_queryhistory_statement_number|2014-05-15 15:09:57.465573
39|beeswax|0006_auto__add_field_session_application|2014-05-15 15:09:57.490085
40|beeswax|0007_auto__add_field_savedquery_is_trashed|2014-05-15 15:09:57.519911
41|beeswax|0008_auto__add_field_queryhistory_query_type|2014-05-15 15:09:57.619774
42|hbase|0001_initial|2014-05-15 15:09:57.824816
43|jobsub|0001_initial|2014-05-15 15:09:57.893672
44|jobsub|0002_auto__add_ooziestreamingaction__add_oozieaction__add_oozieworkflow__ad|2014-05-15 15:09:57.956885
45|jobsub|0003_convertCharFieldtoTextField|2014-05-15 15:09:57.999756
46|jobsub|0004_hue1_to_hue2|2014-05-15 15:09:58.022462
47|jobsub|0005_unify_with_oozie|2014-05-15 15:09:58.047078
48|jobsub|0006_chg_varchars_to_textfields|2014-05-15 15:09:58.085034
49|search|0001_initial|2014-05-15 15:09:58.340575
50|search|0002_auto__del_core__add_collection|2014-05-15 15:09:58.360332
51|spark|0001_initial|2014-05-15 15:09:58.424897
52|sqoop|0001_initial|2014-05-15 15:09:58.484780
53|useradmin|0001_permissions_and_profiles|2014-05-15 15:09:58.682233
54|useradmin|0002_add_ldap_support|2014-05-15 15:09:58.708703
55|useradmin|0003_remove_metastore_readonly_huepermission|2014-05-15 15:09:58.723714
romain
  1. Ship It!
  2. 
      
abec
Review request changed

Status: Closed (submitted)

Loading...