Skip to content

Commit bf9069c

Browse files
committed
Merge pull request #139 from cyberious/master
(MODULES-2451) Fix issue with integer interpretations
2 parents 3349c52 + 70b3bcb commit bf9069c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates/create/login.sql.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ BEGIN
1616
<% @svrroles.each do |role, enable_bit| -%>
1717
IF IS_SRVROLEMEMBER('<%= role %>','<%= @login %>') != <%= enable_bit %>
1818
BEGIN
19-
<% if enable_bit == '1' -%>
19+
<% if enable_bit == '1' || enable_bit == 1 -%>
2020
ALTER SERVER ROLE <%= role %> ADD MEMBER [<%= @login %>];
2121
<% else -%>
2222
ALTER SERVER ROLE <%= role %> DROP MEMBER [<%= @login %>];
@@ -39,7 +39,7 @@ BEGIN
3939
DEFAULT_LANGUAGE = [<%= @default_language %>],
4040
DEFAULT_DATABASE = [<%= @default_database %>];
4141
<% @svrroles.each do |role, enable_bit| -%>
42-
<% if enable_bit == '1' -%>
42+
<% if enable_bit == '1' || enable_bit == 1 -%>
4343
ALTER SERVER ROLE <%= role %> ADD MEMBER [<%= @login %>];
4444
<% else -%>
4545
ALTER SERVER ROLE <%= role %> DROP MEMBER [<%= @login %>];

0 commit comments

Comments
 (0)