public SQLScript NewSQLScript(string id, SQLTYPE type) { var script = new SQLScript(accessor, id, type, _pCounter, _tCounter); _list.Add(script); return(script); }
public Script AddScript(string ScriptFile, int order, SQLTYPE type) { if (UpgradeScripts.Select(u => u.Order).Contains(order)) { throw new Exception($"Could not add script {ScriptFile}, a script with {order} already exists"); } var script = new Script(ScriptFile, order, type, this); _upgradeScripts.Add(script); return(script); }
public Script(string ScriptFile, int order, SQLTYPE type, Feature feature) { FileName = ScriptFile; Feature = feature; Order = order; Type = type; if (!_migrationTypes.Contains(type)) { if (Regex.IsMatch(SQL, ILLEGAL_REGEX)) { throw new Exception($"Not allowed to have ALTER in {type.ToString()} files"); } } }
internal SQLScript(IDatabaseAccessor accessor, string id, SQLTYPE type, Counter pcounter, Counter tcounter) : base(accessor, pcounter, tcounter) { ID = id; _list = new List <SQLItem>(); TYPE = type; }
public SQLScript(IDatabaseAccessor accessor, SQLTYPE type, Counter pcounter = null, Counter tcounter = null) : this(accessor, null, type, pcounter, tcounter) { }