• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 2.0
    • 1.6
    • Database
    • None

      We currently have a mix of upper-case and lower-case table names in Crowd. For example, ApplicationDirectoryPermission.hbm.xml contains no backticks in the table name:

          <class name="com.atlassian.crowd.model.permission.ApplicationDirectoryPermission" table="APPLICATIONDIRECTORYPERMISSION">
      

      while Application.hbm.xml does:

          <class name="com.atlassian.crowd.model.application.Application" table="`APPLICATION`">
      

      We should default on one convention as case-sensitive databases like Postgres will require you to wrap all queries that reference the tables or columns in quotes or the query won't be recognized. For people that might be interested in querying the database, or for times when we need to pass some queries to users to run, it would be nice not to have to worry about this.

        1. mysql_startup.txt
          14 kB
        2. mysql-crowd2.png
          mysql-crowd2.png
          32 kB

            [CWD-1411] Make Crowd database schema lowercase

            yes, we did this to resolve the irregularity you have seen here and to generally be inline with JIRA/Confluence/Bamboo etc.

            Justin Koke added a comment - yes, we did this to resolve the irregularity you have seen here and to generally be inline with JIRA/Confluence/Bamboo etc.

            angel added a comment -

            BTW, in the final 2.0 release all tables should be lowercase, right? As per CWD-1574.

            angel added a comment - BTW, in the final 2.0 release all tables should be lowercase, right? As per CWD-1574 .

            angel added a comment -

            Hi Justin,

            Using MySQL 5.0.45 on a Mac with mysql-connector-java-5.0.6-bin.jar. I get the same behavior from both the standalone and the source distribution. I'll give another try with a fresh installation to collect the logs.

            Cheers,

            Aggelos

            angel added a comment - Hi Justin, Using MySQL 5.0.45 on a Mac with mysql-connector-java-5.0.6-bin.jar. I get the same behavior from both the standalone and the source distribution. I'll give another try with a fresh installation to collect the logs. Cheers, Aggelos

            Hi Aggelos,

            When crowd starts up I get the attached statements being executed by hibernate.

            The only table that is lowercase is the hibernate_unique_key for hilo generation.

            What version of MySQL (including JDBC driver version) are you using?

            I am currently using: MySQL 5.1.30 and JDBC driver 5.1.7.

            Cheers,

            Justin

            Justin Koke added a comment - Hi Aggelos, When crowd starts up I get the attached statements being executed by hibernate. The only table that is lowercase is the hibernate_unique_key for hilo generation. What version of MySQL (including JDBC driver version) are you using? I am currently using: MySQL 5.1.30 and JDBC driver 5.1.7. Cheers, Justin

            angel added a comment -

            Justin,

            trying out the Beta2 installation I've noticed that some of the tables are lowercase and the majority is uppercase. I'm Attaching a screenshot of the created schema in MySQL. Is this expected?

            Cheers,
            Aggelos

            angel added a comment - Justin, trying out the Beta2 installation I've noticed that some of the tables are lowercase and the majority is uppercase. I'm Attaching a screenshot of the created schema in MySQL. Is this expected? Cheers, Aggelos

            Fixed as part of our Schema upgrade/improvements

            Justin Koke added a comment - Fixed as part of our Schema upgrade/improvements

            Will be fixed as part of the schema update we're working on right now.

            David O'Flynn [Atlassian] added a comment - Will be fixed as part of the schema update we're working on right now.

              doflynn David O'Flynn [Atlassian]
              davidyu David Yu
              Affected customers:
              0 This affects my team
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: