Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Duplicated Asset Server DB, Showing Up in Admin List

Discussion in 'Editor & General Support' started by MatthewW, Feb 13, 2008.

  1. MatthewW

    MatthewW

    Joined:
    Nov 30, 2006
    Posts:
    1,356
    So we duplicated some asset server databases in order to fork the projects. I created a new database with:

    /opt/unity_asset_server/bin/createdb -U admin -h localhost -p 10733 --template=oldproject newproject

    So we end up with newproject containing a copy of oldproject. This worked fine.

    The new copies don't show up in the Asset Server Adminsitration menu in Unity, though, so I can't easily add new users to them.

    How do I fix this (and is there a better way to duplicate entire projects)?
     
  2. freyr

    freyr

    Joined:
    Apr 7, 2005
    Posts:
    1,148
    This way of copying the project does not create the specially formatted database comments that's used by unity to assign readable names to the internal database names.

    So after doing the createdb incantation, you will need to create a comment on the database:

    Code (csharp):
    1.  
    2. /opt/unity_asset_server/bin/psql -U admin -h localhost -d newproject -c "comment on database newproject is 'maint:New Project:copied from old project:1.0' "
    3.  
    The format of the comment string is maint:Name of project shown in unity:A comment:Schema version

    The string "maint" is just a marker to tell unity that the database is an asset server project ("maint" was the internal working tile for the Asset Server during development).

    The name part is the user visible name of the project.

    The comment is currently not shown anywhere, but in unity-created projects it contains the unity version used to create the project (which was useful to us when debugging the asset server during the beta testing).

    The final field is the database schema version. This must currently be "1.0" and is used for backwards compatibility in case we need to modify the database schema in future asset server versions.