Hmmm

More from the log:



Upgrading ERAttachment to version 0 with migration 
'er.attachment.migrations.ERAttachment0@5c66b06b'
Nov 04 14:10:03 MidwestFoodsWeb[65241] INFO  
er.extensions.jdbc.ERXJDBCUtilities  - Executing CREATE TABLE 
ERAttachment(attachmentDataID INTEGER, configurationName VARCHAR(100), 
filesystemPath VARCHAR(255), height INTEGER, id INTEGER NOT NULL, mimeType 
VARCHAR(100) NOT NULL, originalFileName VARCHAR(255) NOT NULL, ownerID 
VARCHAR(16), parentID INTEGER, proxied VARCHAR(5) NOT NULL, s3Path 
VARCHAR(1000), size INTEGER NOT NULL, smallData LONG VARBINARY, storageType 
VARCHAR(10), thumbnail VARCHAR(10), webPath VARCHAR(1000) NOT NULL, width 
INTEGER)
Nov 04 14:10:03 MidwestFoodsWeb[65241] INFO  
er.extensions.jdbc.ERXJDBCUtilities  - Executing ALTER TABLE ERAttachment ADD 
PRIMARY KEY (id)
Nov 04 14:10:03 MidwestFoodsWeb[65241] INFO  
er.extensions.jdbc.ERXJDBCUtilities  - Executing ALTER TABLE `ERAttachment` ADD 
UNIQUE `ERAttachmentWebPath` (`webPath`(255))
Nov 04 14:10:03 MidwestFoodsWeb[65241] INFO  
er.extensions.jdbc.ERXJDBCUtilities  - Executing CREATE TABLE 
ERAttachmentData(data LONG VARBINARY, id INTEGER NOT NULL)
Nov 04 14:10:03 MidwestFoodsWeb[65241] INFO  
er.extensions.jdbc.ERXJDBCUtilities  - Executing ALTER TABLE ERAttachmentData 
ADD PRIMARY KEY (id)
Nov 04 14:10:03 MidwestFoodsWeb[65241] INFO  
er.extensions.jdbc.ERXJDBCUtilities  - Executing ALTER TABLE ERAttachment ADD 
CONSTRAINT ERAttachment_attachmentDataID_id_FK FOREIGN KEY (attachmentDataID) 
REFERENCES ERAttachmentData (id)
Nov 04 14:10:03 MidwestFoodsWeb[65241] DEBUG NSLog  -  evaluateExpression: 
<com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "UPDATE _dbupdater SET 
version = ? WHERE modelname = ?" withBindings: 1:0(version), 
2:"ERAttachment"(modelName)>
Nov 04 14:10:04 MidwestFoodsWeb[65241] DEBUG NSLog  -  === Commit Internal 
Transaction
Nov 04 14:10:04 MidwestFoodsWeb[65241] DEBUG NSLog  -  === Begin Internal 
Transaction
Nov 04 14:10:04 MidwestFoodsWeb[65241] INFO  
er.extensions.migration.ERXMigrator  - ERAttachment is now version 0

==== >>  PERFECT !! SO FAR


Nov 04 14:10:04 MidwestFoodsWeb[65241] DEBUG NSLog  -  === Commit Internal 
Transaction
Nov 04 14:10:04 MidwestFoodsWeb[65241] DEBUG NSLog  -  === Begin Internal 
Transaction
Nov 04 14:10:04 MidwestFoodsWeb[65241] DEBUG NSLog  -  evaluateExpression: 
<com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "UPDATE _dbupdater SET 
lockowner = NULL, updatelock = ? WHERE modelname = ?" withBindings: 
1:0(updateLock), 2:"ERAttachment"(modelName)>
Nov 04 14:10:04 MidwestFoodsWeb[65241] DEBUG NSLog  -  === Commit Internal 
Transaction
Nov 04 14:10:04 MidwestFoodsWeb[65241] DEBUG NSLog  -  === Begin Internal 
Transaction
Nov 04 14:10:04 MidwestFoodsWeb[65241] DEBUG NSLog  -  === Commit Internal 
Transaction
Nov 04 14:10:04 MidwestFoodsWeb[65241] DEBUG NSLog  - Using JDBCPlugIn 
'com.webobjects.jdbcadaptor.MySQLPlugIn' for JDBCAdaptor@909751202
Nov 04 14:10:04 MidwestFoodsWeb[65241] DEBUG NSLog  -  === Begin Internal 
Transaction
Nov 04 14:10:04 MidwestFoodsWeb[65241] DEBUG NSLog  -  evaluateExpression: 
<com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "UPDATE _dbupdater SET 
lockowner = ?, updatelock = ? WHERE (modelname = ? AND (updatelock = ? OR 
lockowner = ?))" withBindings: 
1:"MidwestFoodsWeb-James-iMac-2.local:-1"(lockOwner), 2:1(updateLock), 
3:"ERAttachment"(modelName), 4:0(updateLock), 
5:"MidwestFoodsWeb-James-iMac-2.local:-1"(lockOwner)>
Nov 04 14:10:04 MidwestFoodsWeb[65241] DEBUG NSLog  -  === Commit Internal 
Transaction
Nov 04 14:10:04 MidwestFoodsWeb[65241] DEBUG NSLog  -  === Begin Internal 
Transaction
Nov 04 14:10:04 MidwestFoodsWeb[65241] DEBUG NSLog  -  evaluateExpression: 
<com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "SELECT t0.version 
FROM _dbupdater t0 WHERE t0.modelname = ?" withBindings: 
1:"ERAttachment"(modelName)>
Nov 04 14:10:04 MidwestFoodsWeb[65241] DEBUG NSLog  - fetch canceled
Nov 04 14:10:04 MidwestFoodsWeb[65241] DEBUG NSLog  - 1 row(s) processed


==== >>>>>>   NOW WHY THIS?!!

Nov 04 14:10:04 MidwestFoodsWeb[65241] INFO  
er.extensions.migration.ERXMigrator  - Upgrading ERAttachment to version 1 with 
migration 'er.attachment.migrations.ERAttachment1@35f784d7'

Everything is set to 0 in my properties file?

James






On Nov 4, 2011, at 2:30 PM, Chuck Hill wrote:

> DB plugin not added to project.
> 
> 
> On 2011-11-04, at 12:15 PM, James Cicenia wrote:
> 
>> Hello -
>> 
>> I am developing another D2WApp and using Migrations from the very start.
>> 
>> However, when I first start my application I get this error:
>> 
>> Executing alter table ERAttachment null available VARCHAR(5) NOT NULL
>> 
>> I am using ERAttachment and here is my migration file:
>> 
>> Anything seem obvious?
>> 
>> James
>> 
>> 
>> ==============
>> package com.jimijon.mwf.migrations;
>> 
>> 
>> import com.webobjects.eocontrol.EOEditingContext;
>> import com.webobjects.foundation.NSArray;
>> 
>> import er.extensions.jdbc.ERXSQLHelper.ColumnIndex;
>> import er.extensions.migration.ERXMigrationDatabase;
>> import er.extensions.migration.ERXMigrationIndex;
>> import er.extensions.migration.ERXMigrationTable;
>> import er.extensions.migration.ERXModelVersion;
>> 
>> public class MidwestFoodsModel0 extends ERXMigrationDatabase.Migration {
>>      @Override
>>      public NSArray<ERXModelVersion> modelDependencies() {
>>              return null;
>>      }
>> 
>>      @Override
>>      public void downgrade(EOEditingContext editingContext, 
>> ERXMigrationDatabase database) throws Throwable {
>>              // DO NOTHING
>>      }
>> 
>>      @Override
>>      public void upgrade(EOEditingContext editingContext, 
>> ERXMigrationDatabase database) throws Throwable {
>>              ERXMigrationTable foodFamilyTable = 
>> database.newTableNamed("food_family");
>>              foodFamilyTable.newTimestampColumn("add_date", true);
>>              foodFamilyTable.newIntegerColumn("id", false);
>>              foodFamilyTable.newIntegerColumn("main_image_erattachment_id", 
>> true);
>>              foodFamilyTable.newTimestampColumn("mod_date", true);
>>              foodFamilyTable.newStringColumn("name", 255, false);
>>              foodFamilyTable.newIntegerColumn("thumbnail_erattachment_id", 
>> true);
>>              foodFamilyTable.create();
>>              foodFamilyTable.setPrimaryKey("id");
>> 
>>              ERXMigrationTable foodItemTable = 
>> database.newTableNamed("food_item");
>>              foodItemTable.newTimestampColumn("add_date", true);
>>              foodItemTable.newStringColumn("availability_status", 50, true);
>>              foodItemTable.newStringColumn("food_family", 100, true);
>>              foodItemTable.newStringColumn("fruit_or_vegetable_type", 100, 
>> true);
>>              foodItemTable.newIntegerColumn("id", false);
>>              foodItemTable.newIntegerColumn("main_image_erattachment_id", 
>> true);
>>              foodItemTable.newTimestampColumn("mod_date", true);
>>              foodItemTable.newStringColumn("name", 100, false);
>>              foodItemTable.newBigDecimalColumn("price", 38, 4, true);
>>              foodItemTable.newStringColumn("price_status", 50, false);
>>              foodItemTable.newStringColumn("quality_status", 50, false);
>>              foodItemTable.newBooleanColumn("seasonal_second_half_sep", 
>> true);
>>              foodItemTable.newStringColumn("sku", 50, true);
>>              foodItemTable.newIntegerColumn("thumbnail_erattachment_id", 
>> true);
>>              foodItemTable.create();
>>              foodItemTable.setPrimaryKey("id");
>> 
>>              ERXMigrationTable newsItemTable = 
>> database.newTableNamed("news_item");
>>              newsItemTable.newTimestampColumn("add_date", true);
>>              newsItemTable.newDateColumn("entryDate", false);
>>              newsItemTable.newIntegerColumn("food_family_id", false);
>>              newsItemTable.newIntegerColumn("food_item_id", true);
>>              newsItemTable.newIntegerColumn("id", false);
>>              newsItemTable.newTimestampColumn("mod_date", true);
>>              newsItemTable.newStringColumn("name", 255, false);
>>              newsItemTable.create();
>>              newsItemTable.setPrimaryKey("id");
>> 
>>              foodFamilyTable.addForeignKey("main_image_erattachment_id", 
>> "ERAttachment", "id");
>>              foodFamilyTable.addForeignKey("thumbnail_erattachment_id", 
>> "ERAttachment", "id");
>>              foodItemTable.addForeignKey("main_image_erattachment_id", 
>> "ERAttachment", "id");
>>              foodItemTable.addForeignKey("thumbnail_erattachment_id", 
>> "ERAttachment", "id");
>>              newsItemTable.addForeignKey("food_family_id", "food_family", 
>> "id");
>>              newsItemTable.addForeignKey("food_item_id", "food_item", "id");
>>      }
>> }
>> 
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Webobjects-dev mailing list      ([email protected])
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
>> 
>> This email sent to [email protected]
> 
> -- 
> Chuck Hill             Senior Consultant / VP Development
> 
> Practical WebObjects - for developers who want to increase their overall 
> knowledge of WebObjects or who are trying to solve specific problems.    
> http://www.global-village.net/products/practical_webobjects
> 
> 
> 
> 
> 
> 
> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to