Package liquibase.statement.core

Examples of liquibase.statement.core.CreateTableStatement.addColumn()


    @Test
    public void testAutoIncrementStartWithMySQLDatabase() throws Exception {
      for (Database database : TestContext.getInstance().getAllDatabases()) {
        if (database instanceof MySQLDatabase) {
          CreateTableStatement statement = new CreateTableStatement(CATALOG_NAME, SCHEMA_NAME, TABLE_NAME);
          statement.addColumn(
            COLUMN_NAME1,
            DataTypeFactory.getInstance().fromDescription("BIGINT{autoIncrement:true}", database),
            new AutoIncrementConstraint(COLUMN_NAME1, BigInteger.valueOf(2), null)
          );
View Full Code Here


    @Test
    public void testAutoIncrementStartWithIncrementByMySQLDatabase() throws Exception {
      for (Database database : TestContext.getInstance().getAllDatabases()) {
        if (database instanceof MySQLDatabase) {
          CreateTableStatement statement = new CreateTableStatement(CATALOG_NAME, SCHEMA_NAME, TABLE_NAME);
          statement.addColumn(
            COLUMN_NAME1,
            DataTypeFactory.getInstance().fromDescription("BIGINT{autoIncrement:true}", database),
            new AutoIncrementConstraint(COLUMN_NAME1, BigInteger.valueOf(2), BigInteger.TEN)
          );
View Full Code Here

    @Test
    public void testAutoIncrementPostgresDatabase() throws Exception {
      for (Database database : TestContext.getInstance().getAllDatabases()) {
        if (database instanceof PostgresDatabase) {
          CreateTableStatement statement = new CreateTableStatement(CATALOG_NAME, SCHEMA_NAME, TABLE_NAME);
          statement.addColumn(
            COLUMN_NAME1,
            DataTypeFactory.getInstance().fromDescription("BIGINT{autoIncrement:true}", database),
            new AutoIncrementConstraint(COLUMN_NAME1)
          );
View Full Code Here

    @Test
    public void testAutoIncrementStartWithPostgresDatabase() throws Exception {
      for (Database database : TestContext.getInstance().getAllDatabases()) {
        if (database instanceof PostgresDatabase) {
          CreateTableStatement statement = new CreateTableStatement(CATALOG_NAME, SCHEMA_NAME, TABLE_NAME);
          statement.addColumn(
            COLUMN_NAME1,
            DataTypeFactory.getInstance().fromDescription("BIGINT{autoIncrement:true}", database),
            new AutoIncrementConstraint(COLUMN_NAME1, BigInteger.ZERO, null)
          );
View Full Code Here

    @Test
    public void testAutoIncrementStartWithIncrementByPostgresDatabase() throws Exception {
      for (Database database : TestContext.getInstance().getAllDatabases()) {
        if (database instanceof PostgresDatabase) {
          CreateTableStatement statement = new CreateTableStatement(CATALOG_NAME, SCHEMA_NAME, TABLE_NAME);
          statement.addColumn(
            COLUMN_NAME1,
            DataTypeFactory.getInstance().fromDescription("BIGINT{autoIncrement:true}", database),
            new AutoIncrementConstraint(COLUMN_NAME1, BigInteger.ZERO, BigInteger.TEN)
          );
View Full Code Here

    @Test
    public void testAutoIncrementSQLiteDatabase() throws Exception {
      for (Database database : TestContext.getInstance().getAllDatabases()) {
        if (database instanceof SQLiteDatabase) {
          CreateTableStatement statement = new CreateTableStatement(CATALOG_NAME, SCHEMA_NAME, TABLE_NAME);
          statement.addColumn(
            COLUMN_NAME1,
            DataTypeFactory.getInstance().fromDescription("BIGINT{autoIncrement:true}", database),
            new AutoIncrementConstraint(COLUMN_NAME1)
          );
View Full Code Here

    @Test
    public void testAutoIncrementStartWithSQLiteDatabase() throws Exception {
      for (Database database : TestContext.getInstance().getAllDatabases()) {
        if (database instanceof SQLiteDatabase) {
          CreateTableStatement statement = new CreateTableStatement(CATALOG_NAME, SCHEMA_NAME, TABLE_NAME);
          statement.addColumn(
            COLUMN_NAME1,
            DataTypeFactory.getInstance().fromDescription("BIGINT{autoIncrement:true}", database),
            new AutoIncrementConstraint(COLUMN_NAME1, BigInteger.valueOf(2), null)
          );
View Full Code Here

    @Test
    public void testAutoIncrementStartWithIncrementBySQLiteDatabase() throws Exception {
      for (Database database : TestContext.getInstance().getAllDatabases()) {
        if (database instanceof SQLiteDatabase) {
          CreateTableStatement statement = new CreateTableStatement(CATALOG_NAME, SCHEMA_NAME, TABLE_NAME);
          statement.addColumn(
            COLUMN_NAME1,
            DataTypeFactory.getInstance().fromDescription("BIGINT{autoIncrement:true}", database),
            new AutoIncrementConstraint(COLUMN_NAME1, BigInteger.valueOf(2), BigInteger.TEN)
          );
View Full Code Here

    @Test
    public void testAutoIncrementSybaseASADatabase() throws Exception {
      for (Database database : TestContext.getInstance().getAllDatabases()) {
        if (database instanceof SybaseASADatabase) {
          CreateTableStatement statement = new CreateTableStatement(CATALOG_NAME, SCHEMA_NAME, TABLE_NAME);
          statement.addColumn(
            COLUMN_NAME1,
            DataTypeFactory.getInstance().fromDescription("BIGINT{autoIncrement:true}", database),
            new AutoIncrementConstraint(COLUMN_NAME1)
          );
View Full Code Here

    @Test
    public void testAutoIncrementStartWithSybaseASADatabase() throws Exception {
      for (Database database : TestContext.getInstance().getAllDatabases()) {
        if (database instanceof SybaseASADatabase) {
          CreateTableStatement statement = new CreateTableStatement(CATALOG_NAME, SCHEMA_NAME, TABLE_NAME);
          statement.addColumn(
            COLUMN_NAME1,
            DataTypeFactory.getInstance().fromDescription("BIGINT{autoIncrement:true}", database),
            new AutoIncrementConstraint(COLUMN_NAME1, BigInteger.valueOf(2), null)
          );
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.