Examples of SchemaUpdate


Examples of org.hibernate.tool.hbm2ddl.SchemaUpdate

    if ( settings.isAutoCreateSchema() ) {
      new SchemaExport( serviceRegistry, cfg ).create( false, true );
    }
    if ( settings.isAutoUpdateSchema() ) {
      new SchemaUpdate( serviceRegistry, cfg ).execute( false, true );
    }
    if ( settings.isAutoValidateSchema() ) {
      new SchemaValidator( serviceRegistry, cfg ).validate();
    }
    if ( settings.isAutoDropSchema() ) {
View Full Code Here

Examples of org.hibernate.tool.hbm2ddl.SchemaUpdate

     * @throws EvolizerException
     */
    public void updateSchema(Properties properties) throws EvolizerException {
        try {
            Configuration configuration = configureDataBaseConnection(properties);
            SchemaUpdate updater = new SchemaUpdate(configuration);
            updater.execute(false, true);
        } catch (HibernateException he) {
            throw new EvolizerException(he);
        }
    }
View Full Code Here

Examples of org.hibernate.tool.hbm2ddl.SchemaUpdate

              }
          }
         
          if (mode == Mode.UPDATE)
          {
              SchemaUpdate update = new SchemaUpdate(configuration, settings);
              update.execute(true, exec);
          }
          else
          {
              SchemaExport export = exec ? new SchemaExport(configuration, settings) :
                      new SchemaExport(configuration);
View Full Code Here

Examples of org.hibernate.tool.hbm2ddl.SchemaUpdate

      new SchemaExport( serviceRegistry, cfg )
          .setImportSqlCommandExtractor( serviceRegistry.getService( ImportSqlCommandExtractor.class ) )
          .create( false, true );
    }
    if ( settings.isAutoUpdateSchema() ) {
      new SchemaUpdate( serviceRegistry, cfg ).execute( false, true );
    }
    if ( settings.isAutoValidateSchema() ) {
      new SchemaValidator( serviceRegistry, cfg ).validate();
    }
    if ( settings.isAutoDropSchema() ) {
View Full Code Here

Examples of org.hibernate.tool.hbm2ddl.SchemaUpdate

        for (String resource : mappingResources) {
            cfg.addResource(resource);
        } // end for
       
        logger.info("begin database schema creation =========================");
        new SchemaUpdate(cfg).execute(true, true);
        logger.info("end database schema creation ===========================");
    }
View Full Code Here

Examples of org.hibernate.tool.hbm2ddl.SchemaUpdate

    if ( settings.isAutoCreateSchema() ) {
      new SchemaExport( cfg, settings ).create( false, true );
    }
    if ( settings.isAutoUpdateSchema() ) {
      new SchemaUpdate( cfg, settings ).execute( false, true );
    }
    if ( settings.isAutoValidateSchema() ) {
      new SchemaValidator( cfg, settings ).validate();
    }
    if ( settings.isAutoDropSchema() ) {
View Full Code Here

Examples of org.hibernate.tool.hbm2ddl.SchemaUpdate

      new SchemaExport( serviceRegistry, cfg )
          .setImportSqlCommandExtractor( serviceRegistry.getService( ImportSqlCommandExtractor.class ) )
          .create( false, true );
    }
    if ( settings.isAutoUpdateSchema() ) {
      new SchemaUpdate( serviceRegistry, cfg ).execute( false, true );
    }
    if ( settings.isAutoValidateSchema() ) {
      new SchemaValidator( serviceRegistry, cfg ).validate();
    }
    if ( settings.isAutoDropSchema() ) {
View Full Code Here

Examples of org.hibernate.tool.hbm2ddl.SchemaUpdate

    if ( settings.isAutoCreateSchema() ) {
      new SchemaExport( cfg, settings ).create( false, true );
    }
    if ( settings.isAutoUpdateSchema() ) {
      new SchemaUpdate( cfg, settings ).execute( false, true );
    }
    if ( settings.isAutoValidateSchema() ) {
      new SchemaValidator( cfg, settings ).validate();
    }
    if ( settings.isAutoDropSchema() ) {
View Full Code Here

Examples of org.hibernate.tool.hbm2ddl.SchemaUpdate

      new SchemaExport( serviceRegistry, cfg )
          .setImportSqlCommandExtractor( serviceRegistry.getService( ImportSqlCommandExtractor.class ) )
          .create( false, true );
    }
    if ( settings.isAutoUpdateSchema() ) {
      new SchemaUpdate( serviceRegistry, cfg ).execute( false, true );
    }
    if ( settings.isAutoValidateSchema() ) {
      new SchemaValidator( serviceRegistry, cfg ).validate();
    }
    if ( settings.isAutoDropSchema() ) {
View Full Code Here

Examples of org.hibernate.tool.hbm2ddl.SchemaUpdate

    Connection conn = session.connection();
    Statement stat = conn.createStatement();
    stat.execute("ALTER TABLE \"SB\".\"Team\" DROP COLUMN name ");
   
    // update schema
    SchemaUpdate su = new SchemaUpdate(getCfg());
    su.execute(true,true);
   
    // we can run schema validation. Note that in the setUp method a *wrong* table
    // has been created with different column names
    // if schema validator chooses the bad db schema, then the testcase will fail (exception)
    SchemaValidator sv = new SchemaValidator(getCfg());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.