Conversation
canton7
left a comment
There was a problem hiding this comment.
Thanks! Sorry it's taken me so long to have a look. Main thing is the question about commenting out oldVersionParam - the rest of the things I can fix up myself.
| oldVersionParam.ParameterName = "OldVersion"; | ||
| oldVersionParam.Value = oldVersion; | ||
| command.Parameters.Add(oldVersionParam); | ||
| //var oldVersionParam = command.CreateParameter(); |
There was a problem hiding this comment.
Is it right that these are now commented out?
There was a problem hiding this comment.
What is role of the parameter ? Is it used for any other provider ? If I uncomment it Oracle wll throw error if the parameter is not used in sql statement
There was a problem hiding this comment.
It's there if custom database providers want to use it. Removing it would be a breaking change.
| public static readonly string MSSQL = @"Server=.;Database=SimpleMigratorTests;Trusted_Connection=True;"; | ||
| public static readonly string MySQL = @"Server=localhost;Database=SimpleMigrator;Uid=SimpleMigrator;Pwd=SimpleMigrator;"; | ||
| public static readonly string PostgreSQL = @"Server=localhost;Port=5432;Database=SimpleMigrator;User ID=SimpleMigrator;Password=SimpleMigrator"; | ||
| public static readonly string Oracle = @"Data Source=localhost:32769/ORCLPDB1.localdomain;User ID=testmig;Password=testmig"; |
There was a problem hiding this comment.
Mind changing these to SimpleMigrator/SimpleMigrator?
| /// <returns>SQL to fetch the current version from the version table</returns> | ||
| protected override string GetCurrentVersionSql() | ||
| { | ||
| return $@"select version from (select version from {this.TableName} order by id desc) where rownum=1"; |
There was a problem hiding this comment.
Different case to the rest of the queries?
| public OracleDatabaseProvider(Func<DbConnection> connectionFactory) | ||
| : base(connectionFactory) | ||
| { | ||
| TableName = "VERSION_INFO"; |
There was a problem hiding this comment.
Is using all caps a particularly strong oracle-ism? I.e. is there a compelling reason to move away from the name used by other database providers?
There was a problem hiding this comment.
Yes, it is standard, oracle names are by default case insensitive and even if you will use small caps it will be stored in dictionary as all caps
86b13b4 to
1d70d94
Compare
Oracle Provider using Oracle Managed Driver