Project Wonder 5.0

er.attachment.migrations
Class ERAttachmentMigration

java.lang.Object
  extended by er.extensions.migration.ERXMigrationDatabase.Migration
      extended by er.attachment.migrations.ERAttachmentMigration
All Implemented Interfaces:
IERXMigration

public abstract class ERAttachmentMigration
extends ERXMigrationDatabase.Migration

Provides a base class for a migration that adds an attachment to an existing table.

Author:
mschrag

Field Summary
 
Fields inherited from class er.extensions.migration.ERXMigrationDatabase.Migration
ALLOWS_NULL, NOT_NULL
 
Constructor Summary
ERAttachmentMigration(java.lang.String tableName, java.lang.String columnName, boolean allowsNull)
          Construct an ERAttachmentMigration.
 
Method Summary
 void downgrade(com.webobjects.eocontrol.EOEditingContext editingContext, ERXMigrationDatabase database)
           
 com.webobjects.foundation.NSArray<ERXModelVersion> modelDependencies()
          Overridden to return null by default
 void upgrade(com.webobjects.eocontrol.EOEditingContext editingContext, ERXMigrationDatabase database)
           
 
Methods inherited from class er.extensions.migration.ERXMigrationDatabase.Migration
downgrade, languages, upgrade
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ERAttachmentMigration

public ERAttachmentMigration(java.lang.String tableName,
                             java.lang.String columnName,
                             boolean allowsNull)
Construct an ERAttachmentMigration.

Parameters:
tableName - the name of the table to add an attachment to
columnName - the name of the attachment foreign key column
allowsNull - whether or not the attachment is allowed to be null
Method Detail

modelDependencies

public com.webobjects.foundation.NSArray<ERXModelVersion> modelDependencies()
Description copied from class: ERXMigrationDatabase.Migration
Overridden to return null by default

Specified by:
modelDependencies in interface IERXMigration
Overrides:
modelDependencies in class ERXMigrationDatabase.Migration
Returns:
an array of model versions that this migration depends on

downgrade

public void downgrade(com.webobjects.eocontrol.EOEditingContext editingContext,
                      ERXMigrationDatabase database)
               throws java.lang.Throwable
Specified by:
downgrade in class ERXMigrationDatabase.Migration
Parameters:
editingContext - the editing context
database - the migration database
Throws:
java.lang.Throwable - if anything goes wrong
See Also:
IERXMigration.downgrade

upgrade

public void upgrade(com.webobjects.eocontrol.EOEditingContext editingContext,
                    ERXMigrationDatabase database)
             throws java.lang.Throwable
Specified by:
upgrade in class ERXMigrationDatabase.Migration
Parameters:
editingContext - the editing context
database - the migration database
Throws:
java.lang.Throwable - if anything goes wrong
See Also:
IERXMigration.upgrade

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.