summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmile Joubert <emile@rabbitmq.com>2013-03-28 17:24:13 +0000
committerEmile Joubert <emile@rabbitmq.com>2013-03-28 17:24:13 +0000
commit0a385f2fab060154f3700fcbd7036d055d1413b8 (patch)
tree1838fce8d4770d221f8f38d325917e2f00e61ecd
parent96de9093402fb2fb789ebd7166ba578787590e9d (diff)
downloadrabbitmq-server-0a385f2fab060154f3700fcbd7036d055d1413b8.tar.gz
Mnesia upgrade for exchange decorators
-rw-r--r--src/rabbit_upgrade_functions.erl15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/rabbit_upgrade_functions.erl b/src/rabbit_upgrade_functions.erl
index 457b1567..5211987f 100644
--- a/src/rabbit_upgrade_functions.erl
+++ b/src/rabbit_upgrade_functions.erl
@@ -43,6 +43,7 @@
-rabbit_upgrade({sync_slave_pids, mnesia, [policy]}).
-rabbit_upgrade({no_mirror_nodes, mnesia, [sync_slave_pids]}).
-rabbit_upgrade({gm_pids, mnesia, [no_mirror_nodes]}).
+-rabbit_upgrade({exchange_decorators, mnesia, [policy]}).
%% -------------------------------------------------------------------
@@ -68,6 +69,7 @@
-spec(sync_slave_pids/0 :: () -> 'ok').
-spec(no_mirror_nodes/0 :: () -> 'ok').
-spec(gm_pids/0 :: () -> 'ok').
+-spec(exchange_decorators/0 :: () -> 'ok').
-endif.
@@ -282,6 +284,19 @@ gm_pids() ->
|| T <- Tables],
ok.
+exchange_decorators() ->
+ ok = exchange_decorators(rabbit_exchange),
+ ok = exchange_decorators(rabbit_durable_exchange).
+
+exchange_decorators(Table) ->
+ transform(
+ Table,
+ fun ({exchange, Name, Type, Dur, AutoDel, Int, Args, Scratches,
+ Policy}) ->
+ {exchange, Name, Type, Dur, AutoDel, Int, Args, Scratches, Policy,
+ {[], []}}
+ end,
+ [name, type, durable, auto_delete, internal, arguments, scratches, policy, decorators]).
%%--------------------------------------------------------------------