我有下面三个模型:
class School < ActiveRecord::Base
audited
has_associated_audits
has_many :subjects, dependent: :destroy
end
class Subject < ActiveRecord::Base
audited associated_with: :school
has_associated_audits
has_many :attachments, as: :attachable, dependent: :destroy
end
class
我在服务器级别创建了一个触发器来控制何时创建数据库。
我有一个在SQL 2014上运行良好的脚本,现在我们转移到了SQL 2017,脚本运行正常,但我收到了很多电子邮件
CREATE TRIGGER [ddl_trig_database]
ON ALL SERVER
FOR ALTER_DATABASE
AS
DECLARE @results NVARCHAR(max)
DECLARE @subjectText NVARCHAR(max)
DECLARE @databaseName NVARCHAR(255)
SET @subjectText = 'NEW DATABASE Cre