title: Ejabberd muc room history getting erased when server restarts
body: <p>I am subscribing to a muc room and I am getting the messages when a user messages to muc room, everything upto here is fine, but when server restarts room history is getting erased, therefore I am unable to get any previous messages.</p>
  
  <p>This is my mod_muc configuration in ejabberd.yml:</p>
  
  <pre><code>mod_mam:
   default: always
   db_type: sql
  mod_muc:
  access:
    - allow
  access_admin:
    - allow: admin
  access_create: muc_create
  access_persistent: muc_create
  default_room_options:
    mam: true
    persistent: true
  </code></pre>