Commit 6257f2d2 authored by Gink's avatar Gink

Adds fresh copy of db in SQL directory

parent 2afcd314
......@@ -29,19 +29,9 @@ This assumes both Python and Git have been already installed and added to the `P
* `pip install musicbrainzngs`
6. Make sure that the `migrations` folder is empty except for the `__init__.py` file
7. Delete the `db.sqlite3` file if it exists
8. Run the following commands (inside the virtualenv):
* `python manage.py makemigrations core playlist search tag user`
* `python manage.py migrate`
9. Open the `db.sqlite3` file in sqlite3, and run the following commands:
* *`sqlite> `* `.read SQL/sqlite3.sql`
* *`sqlite> `* `.quit`
10. Populate the songs database
* Run `python manage.py shell`
* ~~*`>>> `* `exec(open('./SQL/populate_songs.py').read())`~~ DOESN'T WORK YET!
* Instead, copy everything from `populate_songs.py` and then paste into the shell
* *`>>> `* `run()`
* This works for now...
11. Run the web server
8. Get the `SQL/freshdb` file then copy it into the root directory
9. Rename file to db.sqlite3
10. Run the web server
* `python manage.py runserver`
12. (Optional) Create admin account to access the admin interface
11. (Optional) Create admin account to access the admin interface
* `python manage.py createsuperuser`
\ No newline at end of file
=========DO NOT RUN===========
mymusiclist.sql
convert
extract.sql
Assuming you have sqlite3 installed and Django setup with migrations,
While in same directory as db.sqlite3, run:
Sqlite3
.open db.sqlite3
.read SQL/sqlite3.sql
If you're not yet migrated, then do this first:
python manage.py makemigrations core
python manage.py migrate
Now you can view tables with .tables and run sql statements
Assuming you have mysql installed, run:
Mysql
Use mymusiclist
Source sql/mysql.sql
File added
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment