Skip to content

Database administration

Kami Development edited this page Nov 28, 2016 · 4 revisions

Note! The current release of FST does not have detailed documentation for production use.

##Working with the demo database##

###Storage mechanism###

The demo database manager is Sqlite and the complete database is stored as one file. The file path to the demo database is: "fst/fst_web/database/fst_demo.db".

The database does NOT store documents, only links to documents on disk. For demo installations, documents are saved in the folder "fst/fst_web/uploads". There are several subfolders for different kinds of legal documents.

###Configuration###

For demo installations, database settings are configured in 'fst/fst_web/demo_settings.py'.

Edit this part of the file to configure database access.

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': path('database/fst_demo.db')
    }
}

For more details, see https://docs.djangoproject.com/en/1.10/ref/settings/#std:setting-DATABASES

###Demo database###

The demo database comes with two users: admin and editor. A handfull of documents have been uploaded. Some of them have already been published to the newsfeed.

Note. Passwords are equal to user names out-of-the-box. We strongly recommend changing those passwords!

###Resetting the demo database###

The deploy script "fst/deploy/restore_demo_db.sh" can be used to restore the demo database to it's original state.

The folder "fst_web/fs_doc/fixtures" contains the original version of the demo database and the sample documents. It also contains a file named "exempeldata.json", which is used by the unit tests.