Пример #1
0
        protected override string GetInsertJournalEntrySql(string scriptName, string applied, string hash, SqlScript script)
        {
            var unquotedSchemaTableName = UnquotedSchemaTableName.ToUpper(English);

            if (script.RedeployOnChange)
            {
                return($"insert into {FqSchemaTableName} (ScriptName, Applied, Hash) values (:" + scriptName.Replace("@", "") + ",:" + applied.Replace("@", "") + ",:" + hash.Replace("@", "") + ")");
            }
            else
            {
                return($"insert into {unquotedSchemaTableName} (ScriptName, Applied) values (:" + scriptName.Replace("@", "") + ",:" + applied.Replace("@", "") + ")");
            }
        }
Пример #2
0
        protected override string DoesTableExistSql()
        {
            var unquotedSchemaTableName = UnquotedSchemaTableName.ToUpper(English);

            return($"select 1 from user_tables where table_name = '{unquotedSchemaTableName}'");
        }
Пример #3
0
        protected override string GetJournalEntriesSql()
        {
            var unquotedSchemaTableName = UnquotedSchemaTableName.ToUpper(English);

            return($"select scriptname from {unquotedSchemaTableName} order by scriptname");
        }
Пример #4
0
        protected override string GetInsertJournalEntrySql(string scriptName, string applied)
        {
            var unquotedSchemaTableName = UnquotedSchemaTableName.ToUpper(English);

            return($"insert into {unquotedSchemaTableName} (ScriptName, Applied) values (:" + scriptName.Replace("@", "") + ",:" + applied.Replace("@", "") + ")");
        }
Пример #5
0
        protected override string DoesTableExistSql()
        {
            var unquotedSchemaTableName = UnquotedSchemaTableName.ToUpper(English);

            return($"select cast(1 as Int) from systab t where t.table_name = '{unquotedSchemaTableName}'");
        }