• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: migrations with booleans and postgresql
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: migrations with booleans and postgresql


  • Subject: Re: migrations with booleans and postgresql
  • From: Mike Schrag <email@hidden>
  • Date: Wed, 9 Apr 2008 00:07:36 -0400

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
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >migrations with booleans and postgresql (From: Theodore Petrosky <email@hidden>)

  • Prev by Date: Re: EO Programming Guide ?s
  • Next by Date: Re: ERXMigration wrong SQL formed
  • Previous by thread: migrations with booleans and postgresql
  • Next by thread: ERXMigrationTable.newColumn does not set default value
  • Index(es):
    • Date
    • Thread