Annotation Type DbMigration

    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      Platform[] platforms
      Specific platforms this migration change applies to.
      String[] postAdd
      DdlScript that will be executed after the 'add' command.
      String[] postAlter
      DdlScript that will be executed after the 'alter' command
      String[] preAdd
      DdlScript that will be executed before the 'add' command
      String[] preAlter
      DdlScripts that will be executed before the 'alter' command.
    • Element Detail

      • preAlter

        String[] preAlter
        DdlScripts that will be executed before the 'alter' command.

        You may write a custom update routine here. If you do not specify an SQL here, and this will alter the table to a non-null column, ebean will autogenerate a statement from default value like this:

         UPDATE table SET column = 'foo' WHERE column IS NULL
         
        Default:
        {}
      • postAlter

        String[] postAlter
        DdlScript that will be executed after the 'alter' command
        Default:
        {}
      • preAdd

        String[] preAdd
        DdlScript that will be executed before the 'add' command
        Default:
        {}
      • postAdd

        String[] postAdd
        DdlScript that will be executed after the 'add' command. You may write certain update scripts here.
        Default:
        {}
      • platforms

        Platform[] platforms
        Specific platforms this migration change applies to.
        Default:
        {}