Add schema support when connecting Stash to SQL Server, PostgreSQL and Oracle

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Unresolved
    • None
    • Component/s: None
    • None
    • 13
    • 33

      Steps to reproduce:

      SQL Server

      1. Create a database 'atlassian'
      2. Create a schema name 'stash' in the database
      3. Create a user 'stash' with the default schema 'stash'
      4. Connect Stash server with SQL server database 'atlassian'

      All the tables are created in the default schema 'dbo' except for AO tables created in schema 'stash'

      Oracle

      1. Create a database user 'stash'
      2. Grant all the permission to the user 'stash' on the schema 'stash'
      3. Grant another access permission to the user 'stash' on the schema 'crowd' (schema 'crowd' has been used by Crowd application)
      4. Migrate Stash database from HSQLDB to Oracle through the UI
        It will fail with the following error:
        2014-02-07 12:09:03,235 ERROR [http-bio-7990-exec-7] 728x27x0 jv58e6 10.123.16.180 "POST /setup HTTP/1.1" c.a.s.i.db.DefaultDatabaseManager Failed to obtain session factory
        org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactoryPrototype' defined in class path resource [stash-context.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Missing column: is_allow_all in CROWD.CWD_APP_DIR_MAPPING
        	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512) ~[spring-beans-3.2.5.RELEASE.jar:3.2.5.RELEASE]
        	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1129) ~[spring-context-3.2.5.RELEASE.jar:3.2.5.RELEASE]
        	at com.atlassian.stash.internal.db.DefaultDatabaseManager.createSessionFactory(DefaultDatabaseManager.java:337) [stash-service-impl-2.10.1.jar:na]
        	at com.atlassian.stash.internal.db.DefaultDatabaseManager.prepareDatabase(DefaultDatabaseManager.java:158) [stash-service-impl-2.10.1.jar:na]
        

        it seems that Stash somehow try to use the schema 'crowd' cause the database user 'stash' have access permission to it.

            Assignee:
            Unassigned
            Reporter:
            Foong (Inactive)
            Votes:
            16 Vote for this issue
            Watchers:
            25 Start watching this issue

              Created:
              Updated: