Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-8691

Hive sometimes cannot be upgraded using SchemaTool if original database was autocreate-created

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsAdd voteVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      Lazy creation doesn't make sure all tables are present.
      Writing defensive upgrade scripts will make them extremely ugly (we cannot just not do changes if tables do not exist; we'd have to create the stupid table and then do the changes)
      I guess we can accept it for earlier versions... for upgrading from 14 (15?) onwards, perhaps we can have a flag that would indicate the script has been run (as opposed to autoCreate). If not, we'd run database creation script for the original version. All these would need to be made idempotent in a sense that they should pass when the database was already created. It looks like e.g. mysql scripts already are (at least for create table statements) but mssql are not.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned Assign to me
            sershe Sergey Shelukhin

            Dates

              Created:
              Updated:

              Slack

                Issue deployment