Creates a new trigger.
Add-Trigger [-Name] <String> [-SchemaName <String>] [-Definition] <String> [<CommonParameters>]
Creates a new trigger. If updating an existing trigger, use Remove-Trigger
to remove it first, then New-Trigger
to re-create it.
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Name | String | The name of the trigger. |
true | false | |
SchemaName | String | The schema of the trigger. |
false | false | dbo |
Definition | String | The body of the trigger. Everything after and including the |
true | false |
Add-Trigger 'PrintMessage' 'ON rivet.Migrations for insert as print ''Migration applied!'''
Creates a trigger that prints a method when a row gets inserted into the rivet.Migrations
table.