1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-04-27 11:01:14 +00:00
seahub/sql
2024-11-09 14:53:14 +08:00
..
mysql.sql 12.0.3 sql (#7018) 2024-11-09 14:53:14 +08:00
oracle.sql [sql] Update oracle 2016-10-20 17:45:11 +08:00
README.md added sqls for all models 2014-07-09 14:43:12 +08:00
sqlite3.sql update 11.0 sql org_saml_config (#5915) 2024-01-24 10:26:24 +08:00

Seahub Schema

This folder contains database schema for seahub.

Maintainence

The sql files in this folder should always correspond to the latest schema, which means it would give you the same database whether you run the django "syncdb" command or directly import the sqls here.

So each time you change some model, you should update each sql file here.

Get the initial database sqls

SQLite3

To get the sqlite3 sqls:

cd seahub
sqlite3 seahub/seahub.db .dump > sql/sqlite3.sql

MySQL

To get the MySQL sqls:

cd seahub
mysqldump -u root -proot --skip-add-lock --skip-add-drop-table --skip-comments seahub  > sql/mysql.sql