4 Replies Latest reply on May 26, 2008 2:36 PM by adamw

    Version groups and database space management

    andrewwheeler

      What a great project!

      I support the concept of "revisioning groups" for strongly connected entities as a configuration parameter. Perhaps @Versioned(group="mygroup") at the class level. I guess this would create a version info table based on the group name.

      From a database management point of view I'd like to move these audit tables to alternative storage. To use the postgresql terminology, the ability to specify schema or tablespace.

      I suggest adding a configuration element:

      <property name="org.jboss.envers.versionsTablePrefix" value="audit." />
      


      This would create an audit table:
      create table audit.person_v (
      .
      .
      .
      )
      


      This should work for other databases such as Sybase and MS SQL as the prefix would specify another database on the same server.

        • 1. Re: Version groups and database space management
          andrewwheeler

          Having revisited the configuration page I see that the concept of table prefix has been covered. Perhaps some arrangement could also be made so the version info table can be placed in a different schema or tablespace? Perhaps the prefix in this case is not the best configuration option. Maybe another option for schema would be appropriate.

          Appologies for a bogus post.

          • 2. Re: Version groups and database space management
            genman

            A work-around would be to create the tables yourself in a different schema, then add synonyms in one schema to the other. This is what I often see done with Oracle.

            Hopefully, "adamw" will work on creating that SVN repository and JIRA list, and maybe attract a few volunteer hands to work on things like this. Adding a version schema option would be a pretty easy thing for a contributor to add.

            • 3. Re: Version groups and database space management
              adamw

              Hello,

              sorry for the slow replies, but I'm travelling this week and the next, so I have limited time.

              About the SVN - it's coming. In fact, the repository is created, but I don't have write access to it ;). And you can just call me Adam, instead of "adamw" :). Contributions are of course always welcome, even when the SVN is not there, you can always send a patch (the latest dev sources are on the downloads section on the page).

              About the tablespace/catalog/etc: it's certainly possible, and it's also certainly a useful feature. So it will come sooner (when there's a contributor, hopefully) or later (when I'll do it myself) :).

              --
              Adam

              • 4. Re: Version groups and database space management
                adamw

                Hello,

                and here's the SVN, finally :)

                http://anonsvn.jboss.org/repos/envers/trunk

                --
                Adam