anchor.diff:      Acts1 = alter_table_layout(Tab, Old_opts, New_opts, []),
       Acts2 = alter_storage_type(Tab, Old_opts, New_opts, []),
       Acts3 = alter_indexes(Tab, Old_opts, New_opts),
  -    [Acts0, Acts1, Acts2, Acts3].
  +    lists:flatten(
  +      [Acts0, Acts1, Acts2, Acts3]
  +     ).
  +
  +%% Predicate: test if migration will require copying the table. This
  +%% test affects the migration strategy chosen by schematool.
  +%%
  +%% This may be needed because of table type or table options that
  +%% can't be adjusted after the table has been created.
  +%%
  +%% Note: this function is normally called when Old_opts and New_opts
  +%% differ in some respect.
  +%%
  +%% Note: does not consider fragmented tables.
  +
  +migration_needs_table_copy({_Tab, Old_opts, New_opts}) ->
  +    lists:any(
  +      fun({type, New}) ->
  +	      option_not_same(New, type, set, Old_opts);
  +	 ({local_content, New}) ->
  +	      option_not_same(New, local_content, false, Old_opts);
  +	 ({storage_properties, New}) ->
  +	      option_not_same(New, storage_properties, undefined, Old_opts);
  +	 ({snmp, New}) ->
  +	      option_not_same(New, snmp, undefined, Old_opts);
  +	 (_Other) ->
  +	      false
  +      end,
  +      New_opts).
  +
  +option_not_same(New, Opt, Dflt, Old_opts) ->
  +    Old = get_value(Opt, Old_opts, Dflt),
  +    if
  +	Old =/= New ->
  +	    true;
  +	true ->
  +	    false
  +    end.
   
   %% Returns a list of instructions
   %% - perhaps with a priority so we can sort them
  
positive.code: 	      Old = get_value(type, Old_opts, set),
  	      if
  		  Type =/= Old -> 
  		      [{error, {unable_to_change, Tab, Opt}}|Actions];
  		  true ->
  		      Actions
  	      end;
  
negative.code: 		      Actions
  	      end;
  	 ({disc_copies, Ns}, Actions) ->
  	      %% Handled by alter_storage_type
  	      Actions;
  	 ({ram_copies, Ns}, Actions) ->
  	      %% Handled elsewhere
  	      Actions;
  	 ({disc_only_copies, Ns}, Actions) ->
  	      %% Handled by alter_storage_type
  	      Actions;
  	 ({attributes, Attrs}, Actions) ->
  	      %% Handled by alter_storage_type 
  	      Actions;
  	 ({record_name, Rec}, Actions) ->
  	      %% Handled by alter_storage_type 
  	      Actions;
  	 ({index, Ixs}, Actions) ->
  	      %% Handled by alter_indexes
  	      Actions;
  	 ({type, Type}=Opt, Actions) ->
  	      %% check if changed
  