I am working with the examples with using migrations. I want to add a boolean column. Originally, I would have used a varchar and methods to use the strings true and false... Then I found that I can use an external type of bool and a Data Type Boolean - boolean c...
How can I use migrations to create the same thing with the migrations? newIntBooleanColumn MIGHT work here? I use the varchar(5) variant, so I've just never tried. You always have the option of using the full newColumn method, but you'll have to check the jdbc types, etc to see what ends up being the right mappings.
/** * Returns a new ERXMigrationColumn with the given attributes. This method is the * most general-purpose of the .newXxx methods. If this table already exists, * calling the .newXxxColumn methods will immediate execute the SQL to add the * columns to the table. If this table is new, however, calling .newXxxColumn * will only return a metadata object, and you must call .create() on * the table. * * @param name the name of the column to create * @param jdbcType the JDBC type of the column (see java.sql.Types) * @param width the width of the column (or 0 for unspecified) * @param precision the precision of the column (or 0 for unspecified) * @param scale the scale of the column (or 0 for unspecified) * @param allowsNull if true, the column will allow null values * @return the new ERXMigrationColumn * @throws SQLException if the column cannot be created */ public ERXMigrationColumn newColumn(String name, int jdbcType, int width, int precision, int scale, boolean allowsNull, String overrideValueType) throws SQLException {
ms |