File tree Expand file tree Collapse file tree 10 files changed +42
-7
lines changed
node-mssql-programmatic-use Expand file tree Collapse file tree 10 files changed +42
-7
lines changed Original file line number Diff line number Diff line change 11language : node_js
22
3+ dist : jammy
4+
35branches :
46 only :
57 - master
68
79node_js :
810 - node
11+ - 18
912 - 16
10- - 14
1113
1214git :
1315 depth : false
1416
1517install :
1618 # Install hub
17- - sudo snap install hub --classic
19+ - sudo apt update
20+ - sudo apt install hub
1821 - hub --version
1922
20- # Install github-changelog-generator.
23+ # Install github-changelog-generator
2124 - gem install github_changelog_generator
2225
23- # install dependencies
26+ # Install dependencies
2427 - yarn
2528
2629before_script :
Original file line number Diff line number Diff line change 1+ CREATE TRIGGER dbo .trg_users
2+ ON dbo .users
3+ FOR DELETE
4+ AS
5+ BEGIN
6+ DECLARE @deleted_record_count INT = (SELECT COUNT (* ) FROM deleted);
7+
8+ PRINT CAST (@deleted_record_count AS VARCHAR (500 )) + ' user records deleted.' ;
9+ END ;
Original file line number Diff line number Diff line change 44 # Create objects in dbo schema
55 - function/dbo/sum.sql
66 - function/dbo/square.sql
7+ - trigger/dbo/trg_users.sql
78
89 # Create objects in utils schema
910 - schema/utils.sql
Original file line number Diff line number Diff line change 1+ CREATE TRIGGER dbo .trg_users
2+ ON dbo .users
3+ FOR DELETE
4+ AS
5+ BEGIN
6+ DECLARE @deleted_record_count INT = (SELECT COUNT (* ) FROM deleted);
7+
8+ PRINT CAST (@deleted_record_count AS VARCHAR (500 )) + ' user records deleted.' ;
9+ END ;
Original file line number Diff line number Diff line change 44 # Create objects in dbo schema
55 - function/dbo/sum.sql
66 - function/dbo/square.sql
7+ - trigger/dbo/trg_users.sql
78
89 # Create objects in utils schema
910 - schema/utils.sql
Original file line number Diff line number Diff line change 1+ CREATE TRIGGER dbo .trg_users
2+ ON dbo .users
3+ FOR DELETE
4+ AS
5+ BEGIN
6+ DECLARE @deleted_record_count INT = (SELECT COUNT (* ) FROM deleted);
7+
8+ PRINT CAST (@deleted_record_count AS VARCHAR (500 )) + ' user records deleted.' ;
9+ END ;
Original file line number Diff line number Diff line change 44 # Create objects in dbo schema
55 - function/dbo/sum.sql
66 - function/dbo/square.sql
7+ - trigger/dbo/trg_users.sql
78
89 # Create objects in utils schema
910 - schema/utils.sql
Original file line number Diff line number Diff line change 11{
22 "name" : " @leapfrogtechnology/sync-db" ,
33 "description" : " Command line utility to synchronize and version control relational database objects across databases" ,
4- "version" : " 1.0.1 " ,
4+ "version" : " 1.1.0 " ,
55 "license" : " MIT" ,
66 "main" : " lib/index.js" ,
77 "types" : " lib/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ enum DatabaseObjectTypes {
55 VIEW = 'view' ,
66 SCHEMA = 'schema' ,
77 FUNCTION = 'function' ,
8- PROCEDURE = 'procedure'
8+ PROCEDURE = 'procedure' ,
9+ TRIGGER = 'trigger'
910}
1011
1112export default DatabaseObjectTypes ;
Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ const dropStatementsMap: Mapping<string> = {
1717 [ DatabaseObjectTypes . SCHEMA ] : 'DROP SCHEMA IF EXISTS' ,
1818 [ DatabaseObjectTypes . VIEW ] : 'DROP VIEW IF EXISTS' ,
1919 [ DatabaseObjectTypes . FUNCTION ] : 'DROP FUNCTION IF EXISTS' ,
20- [ DatabaseObjectTypes . PROCEDURE ] : 'DROP PROCEDURE IF EXISTS'
20+ [ DatabaseObjectTypes . PROCEDURE ] : 'DROP PROCEDURE IF EXISTS' ,
21+ [ DatabaseObjectTypes . TRIGGER ] : 'DROP TRIGGER IF EXISTS'
2122} ;
2223
2324/**
You can’t perform that action at this time.
0 commit comments