@@ -10,6 +10,7 @@ import (
10
10
"github.com/stretchr/testify/assert"
11
11
12
12
"github.com/xataio/pgroll/internal/testutils"
13
+ "github.com/xataio/pgroll/pkg/backfill"
13
14
"github.com/xataio/pgroll/pkg/migrations"
14
15
)
15
16
@@ -858,11 +859,11 @@ func TestAddColumnWithUpSql(t *testing.T) {
858
859
},
859
860
afterRollback : func (t * testing.T , db * sql.DB , schema string ) {
860
861
// The trigger function has been dropped.
861
- triggerFnName := migrations .TriggerFunctionName ("products" , "description" )
862
+ triggerFnName := backfill .TriggerFunctionName ("products" , "description" )
862
863
FunctionMustNotExist (t , db , schema , triggerFnName )
863
864
864
865
// The trigger has been dropped.
865
- triggerName := migrations .TriggerName ("products" , "description" )
866
+ triggerName := backfill .TriggerName ("products" , "description" )
866
867
TriggerMustNotExist (t , db , schema , "products" , triggerName )
867
868
},
868
869
afterComplete : func (t * testing.T , db * sql.DB , schema string ) {
@@ -874,11 +875,11 @@ func TestAddColumnWithUpSql(t *testing.T) {
874
875
}, res )
875
876
876
877
// The trigger function has been dropped.
877
- triggerFnName := migrations .TriggerFunctionName ("products" , "description" )
878
+ triggerFnName := backfill .TriggerFunctionName ("products" , "description" )
878
879
FunctionMustNotExist (t , db , schema , triggerFnName )
879
880
880
881
// The trigger has been dropped.
881
- triggerName := migrations .TriggerName ("products" , "description" )
882
+ triggerName := backfill .TriggerName ("products" , "description" )
882
883
TriggerMustNotExist (t , db , schema , "products" , triggerName )
883
884
},
884
885
},
@@ -940,11 +941,11 @@ func TestAddColumnWithUpSql(t *testing.T) {
940
941
},
941
942
afterRollback : func (t * testing.T , db * sql.DB , schema string ) {
942
943
// The trigger function has been dropped.
943
- triggerFnName := migrations .TriggerFunctionName ("products" , "description" )
944
+ triggerFnName := backfill .TriggerFunctionName ("products" , "description" )
944
945
FunctionMustNotExist (t , db , schema , triggerFnName )
945
946
946
947
// The trigger has been dropped.
947
- triggerName := migrations .TriggerName ("products" , "description" )
948
+ triggerName := backfill .TriggerName ("products" , "description" )
948
949
TriggerMustNotExist (t , db , schema , "products" , triggerName )
949
950
},
950
951
afterComplete : func (t * testing.T , db * sql.DB , schema string ) {
@@ -956,11 +957,11 @@ func TestAddColumnWithUpSql(t *testing.T) {
956
957
}, res )
957
958
958
959
// The trigger function has been dropped.
959
- triggerFnName := migrations .TriggerFunctionName ("products" , "description" )
960
+ triggerFnName := backfill .TriggerFunctionName ("products" , "description" )
960
961
FunctionMustNotExist (t , db , schema , triggerFnName )
961
962
962
963
// The trigger has been dropped.
963
- triggerName := migrations .TriggerName ("products" , "description" )
964
+ triggerName := backfill .TriggerName ("products" , "description" )
964
965
TriggerMustNotExist (t , db , schema , "products" , triggerName )
965
966
},
966
967
},
@@ -1022,11 +1023,11 @@ func TestAddColumnWithUpSql(t *testing.T) {
1022
1023
},
1023
1024
afterRollback : func (t * testing.T , db * sql.DB , schema string ) {
1024
1025
// The trigger function has been dropped.
1025
- triggerFnName := migrations .TriggerFunctionName ("products" , "description" )
1026
+ triggerFnName := backfill .TriggerFunctionName ("products" , "description" )
1026
1027
FunctionMustNotExist (t , db , schema , triggerFnName )
1027
1028
1028
1029
// The trigger has been dropped.
1029
- triggerName := migrations .TriggerName ("products" , "description" )
1030
+ triggerName := backfill .TriggerName ("products" , "description" )
1030
1031
TriggerMustNotExist (t , db , schema , "products" , triggerName )
1031
1032
},
1032
1033
afterComplete : func (t * testing.T , db * sql.DB , schema string ) {
@@ -1038,11 +1039,11 @@ func TestAddColumnWithUpSql(t *testing.T) {
1038
1039
}, res )
1039
1040
1040
1041
// The trigger function has been dropped.
1041
- triggerFnName := migrations .TriggerFunctionName ("products" , "description" )
1042
+ triggerFnName := backfill .TriggerFunctionName ("products" , "description" )
1042
1043
FunctionMustNotExist (t , db , schema , triggerFnName )
1043
1044
1044
1045
// The trigger has been dropped.
1045
- triggerName := migrations .TriggerName ("products" , "description" )
1046
+ triggerName := backfill .TriggerName ("products" , "description" )
1046
1047
TriggerMustNotExist (t , db , schema , "products" , triggerName )
1047
1048
},
1048
1049
},
@@ -1106,11 +1107,11 @@ func TestAddColumnWithUpSql(t *testing.T) {
1106
1107
},
1107
1108
afterRollback : func (t * testing.T , db * sql.DB , schema string ) {
1108
1109
// The trigger function has been dropped.
1109
- triggerFnName := migrations .TriggerFunctionName ("products" , "description" )
1110
+ triggerFnName := backfill .TriggerFunctionName ("products" , "description" )
1110
1111
FunctionMustNotExist (t , db , schema , triggerFnName )
1111
1112
1112
1113
// The trigger has been dropped.
1113
- triggerName := migrations .TriggerName ("products" , "description" )
1114
+ triggerName := backfill .TriggerName ("products" , "description" )
1114
1115
TriggerMustNotExist (t , db , schema , "products" , triggerName )
1115
1116
},
1116
1117
afterComplete : func (t * testing.T , db * sql.DB , schema string ) {
@@ -1122,11 +1123,11 @@ func TestAddColumnWithUpSql(t *testing.T) {
1122
1123
}, res )
1123
1124
1124
1125
// The trigger function has been dropped.
1125
- triggerFnName := migrations .TriggerFunctionName ("products" , "description" )
1126
+ triggerFnName := backfill .TriggerFunctionName ("products" , "description" )
1126
1127
FunctionMustNotExist (t , db , schema , triggerFnName )
1127
1128
1128
1129
// The trigger has been dropped.
1129
- triggerName := migrations .TriggerName ("products" , "description" )
1130
+ triggerName := backfill .TriggerName ("products" , "description" )
1130
1131
TriggerMustNotExist (t , db , schema , "products" , triggerName )
1131
1132
},
1132
1133
},
@@ -1197,11 +1198,11 @@ func TestAddColumnWithUpSql(t *testing.T) {
1197
1198
},
1198
1199
afterRollback : func (t * testing.T , db * sql.DB , schema string ) {
1199
1200
// The trigger function has been dropped.
1200
- triggerFnName := migrations .TriggerFunctionName ("products" , "description" )
1201
+ triggerFnName := backfill .TriggerFunctionName ("products" , "description" )
1201
1202
FunctionMustNotExist (t , db , schema , triggerFnName )
1202
1203
1203
1204
// The trigger has been dropped.
1204
- triggerName := migrations .TriggerName ("products" , "description" )
1205
+ triggerName := backfill .TriggerName ("products" , "description" )
1205
1206
TriggerMustNotExist (t , db , schema , "products" , triggerName )
1206
1207
},
1207
1208
afterComplete : func (t * testing.T , db * sql.DB , schema string ) {
@@ -1214,11 +1215,11 @@ func TestAddColumnWithUpSql(t *testing.T) {
1214
1215
}, res )
1215
1216
1216
1217
// The trigger function has been dropped.
1217
- triggerFnName := migrations .TriggerFunctionName ("products" , "description" )
1218
+ triggerFnName := backfill .TriggerFunctionName ("products" , "description" )
1218
1219
FunctionMustNotExist (t , db , schema , triggerFnName )
1219
1220
1220
1221
// The trigger has been dropped.
1221
- triggerName := migrations .TriggerName ("products" , "description" )
1222
+ triggerName := backfill .TriggerName ("products" , "description" )
1222
1223
TriggerMustNotExist (t , db , schema , "products" , triggerName )
1223
1224
},
1224
1225
},
0 commit comments