Quick clarification: in most (all?) SQL dialects, you can end a SQL command with a ";" and put several commands in a batch. But in SqlServer and Oracle there are rules about what can be in a batch - for instance, CREATE VIEW must be the first statement
in a batch. So in a script there is a special command to execute the batch - "GO" in SqlServer and / in Oracle.
Now, when you use CompareSchemas.Execute to generate a migration script, it should put in the batch statements. The CompareViews.Execute method will write "GO" before the first DROP/CREATE VIEW. For your scenario (add or change columns, add or change view)
it should work.
Are you creating the migration script using the MigrationGenerator? That just gives you the SQL for each migration operation (AddColumn, AddView etc). It is lower level, so it doesn't assemble the migrations into batches. CompareSchemas is using MigrationGenerator,
but it adds the logic for batches.
If you are using the MigrationGenerator, the easiest and quickest way to ensure it's batch safe is to add "GO" statements between each operation. Something like this...
var script += migrationGenerator.AddColumn(table, newColumn);
script += Environment.NewLine + "GO" + Environment.NewLine;
script += migrationGenerator.AddView(view);
Regarding the second problem...
If the function has "SELECT * " instead of selecting named columns, it will still work with different columns, so no change is needed :)
If you are modifying columns in code (migrationGenerator.AddColumn), the schema model won't update functions and procedures that reference it- unfortunately that's not easy to do!