|
3094 | 3094 | like => { %full_runs, section_post_data => 1, }, |
3095 | 3095 | }, |
3096 | 3096 |
|
| 3097 | +
|
| 3098 | + # Regardless of whether the table or schema is excluded, publications must |
| 3099 | + # still be dumped, as excluded objects do not apply to publications. We |
| 3100 | + # perform table and schema exclusion via full_runs. |
3097 | 3101 | 'ALTER PUBLICATION pub1 ADD TABLE test_table' => { |
3098 | 3102 | create_order => 51, |
3099 | 3103 | create_sql => |
|
3102 | 3106 | \QALTER PUBLICATION pub1 ADD TABLE ONLY dump_test.test_table;\E |
3103 | 3107 | /xm, |
3104 | 3108 | like => { %full_runs, section_post_data => 1, }, |
3105 | | - unlike => { |
3106 | | - exclude_dump_test_schema => 1, |
3107 | | - exclude_test_table => 1, |
3108 | | - }, |
3109 | 3109 | }, |
3110 | 3110 |
|
| 3111 | + # Regardless of whether the table or schema is excluded, publications must |
| 3112 | + # still be dumped, as excluded objects do not apply to publications. We |
| 3113 | + # perform table and schema exclusion via full_runs. |
3111 | 3114 | 'ALTER PUBLICATION pub1 ADD TABLE test_second_table' => { |
3112 | 3115 | create_order => 52, |
3113 | 3116 | create_sql => |
|
3116 | 3119 | \QALTER PUBLICATION pub1 ADD TABLE ONLY dump_test.test_second_table;\E |
3117 | 3120 | /xm, |
3118 | 3121 | like => { %full_runs, section_post_data => 1, }, |
3119 | | - unlike => { exclude_dump_test_schema => 1, }, |
3120 | 3122 | }, |
3121 | 3123 |
|
| 3124 | + # Regardless of whether the table or schema is excluded, publications must |
| 3125 | + # still be dumped, as excluded objects do not apply to publications. We |
| 3126 | + # perform table and schema exclusion via full_runs. |
3122 | 3127 | 'ALTER PUBLICATION pub1 ADD TABLE test_sixth_table (col3, col2)' => { |
3123 | 3128 | create_order => 52, |
3124 | 3129 | create_sql => |
|
3127 | 3132 | \QALTER PUBLICATION pub1 ADD TABLE ONLY dump_test.test_sixth_table (col2, col3);\E |
3128 | 3133 | /xm, |
3129 | 3134 | like => { %full_runs, section_post_data => 1, }, |
3130 | | - unlike => { exclude_dump_test_schema => 1, }, |
3131 | 3135 | }, |
3132 | 3136 |
|
| 3137 | + # Regardless of whether the table or schema is excluded, publications must |
| 3138 | + # still be dumped, as excluded objects do not apply to publications. We |
| 3139 | + # perform table and schema exclusion via full_runs. |
3133 | 3140 | 'ALTER PUBLICATION pub1 ADD TABLE test_seventh_table (col3, col2) WHERE (col1 = 1)' |
3134 | 3141 | => { |
3135 | 3142 | create_order => 52, |
|
3139 | 3146 | \QALTER PUBLICATION pub1 ADD TABLE ONLY dump_test.test_seventh_table (col2, col3) WHERE ((col1 = 1));\E |
3140 | 3147 | /xm, |
3141 | 3148 | like => { %full_runs, section_post_data => 1, }, |
3142 | | - unlike => { exclude_dump_test_schema => 1, }, |
3143 | 3149 | }, |
3144 | 3150 |
|
| 3151 | + # Regardless of whether the table or schema is excluded, publications must |
| 3152 | + # still be dumped, as excluded objects do not apply to publications. We |
| 3153 | + # perform table and schema exclusion via full_runs. |
3145 | 3154 | 'ALTER PUBLICATION pub3 ADD TABLES IN SCHEMA dump_test' => { |
3146 | 3155 | create_order => 51, |
3147 | 3156 | create_sql => |
|
3150 | 3159 | \QALTER PUBLICATION pub3 ADD TABLES IN SCHEMA dump_test;\E |
3151 | 3160 | /xm, |
3152 | 3161 | like => { %full_runs, section_post_data => 1, }, |
3153 | | - unlike => { exclude_dump_test_schema => 1, }, |
3154 | 3162 | }, |
3155 | 3163 |
|
| 3164 | + # Regardless of whether the table or schema is excluded, publications must |
| 3165 | + # still be dumped, as excluded objects do not apply to publications. We |
| 3166 | + # perform table and schema exclusion via full_runs. |
3156 | 3167 | 'ALTER PUBLICATION pub3 ADD TABLES IN SCHEMA public' => { |
3157 | 3168 | create_order => 52, |
3158 | 3169 | create_sql => 'ALTER PUBLICATION pub3 ADD TABLES IN SCHEMA public;', |
|
3162 | 3173 | like => { %full_runs, section_post_data => 1, }, |
3163 | 3174 | }, |
3164 | 3175 |
|
| 3176 | + # Regardless of whether the table or schema is excluded, publications must |
| 3177 | + # still be dumped, as excluded objects do not apply to publications. We |
| 3178 | + # perform table and schema exclusion via full_runs. |
3165 | 3179 | 'ALTER PUBLICATION pub3 ADD TABLE test_table' => { |
3166 | 3180 | create_order => 51, |
3167 | 3181 | create_sql => |
|
3170 | 3184 | \QALTER PUBLICATION pub3 ADD TABLE ONLY dump_test.test_table;\E |
3171 | 3185 | /xm, |
3172 | 3186 | like => { %full_runs, section_post_data => 1, }, |
3173 | | - unlike => { |
3174 | | - exclude_dump_test_schema => 1, |
3175 | | - exclude_test_table => 1, |
3176 | | - }, |
3177 | 3187 | }, |
3178 | 3188 |
|
| 3189 | + # Regardless of whether the table or schema is excluded, publications must |
| 3190 | + # still be dumped, as excluded objects do not apply to publications. We |
| 3191 | + # perform table and schema exclusion via full_runs. |
3179 | 3192 | 'ALTER PUBLICATION pub4 ADD TABLE test_table WHERE (col1 > 0);' => { |
3180 | 3193 | create_order => 51, |
3181 | 3194 | create_sql => |
|
3184 | 3197 | \QALTER PUBLICATION pub4 ADD TABLE ONLY dump_test.test_table WHERE ((col1 > 0));\E |
3185 | 3198 | /xm, |
3186 | 3199 | like => { %full_runs, section_post_data => 1, }, |
3187 | | - unlike => { |
3188 | | - exclude_dump_test_schema => 1, |
3189 | | - exclude_test_table => 1, |
3190 | | - }, |
3191 | 3200 | }, |
3192 | 3201 |
|
| 3202 | + # Regardless of whether the table or schema is excluded, publications must |
| 3203 | + # still be dumped, as excluded objects do not apply to publications. We |
| 3204 | + # perform table and schema exclusion via full_runs. |
3193 | 3205 | 'ALTER PUBLICATION pub4 ADD TABLE test_second_table WHERE (col2 = \'test\');' |
3194 | 3206 | => { |
3195 | 3207 | create_order => 52, |
|
3199 | 3211 | \QALTER PUBLICATION pub4 ADD TABLE ONLY dump_test.test_second_table WHERE ((col2 = 'test'::text));\E |
3200 | 3212 | /xm, |
3201 | 3213 | like => { %full_runs, section_post_data => 1, }, |
3202 | | - unlike => { exclude_dump_test_schema => 1, }, |
3203 | 3214 | }, |
3204 | 3215 |
|
3205 | 3216 | 'CREATE SCHEMA public' => { |
|
0 commit comments