- Create Elmah test DB
This repository contains the code for the Judge and Tournament Registration for NoVA North Odyssey of the Mind.
It is currently built using ASP.NET MVC version 4.
Make sure to copy the web.config file from this directory into the root directory of your website.
- Note: This should be placed in a higher directory than your bin, Content, Views, etc. directories. The directory containing those subdirectories will likely have its own web.config file.
- Make sure that the ASP.NET MVC website directory is set as an application starting point.
- Log into the Winhost Control Panel.
- Navigate to the Odyssey website.
- Navigate to the Sites List -> Site Manager -> Application Starting Point page.
- Make sure that the path to the directory containing the website is registered as an application starting point, e.g. /registration.
- Make sure to back up the database after every season (or before the next one).
- TODO: Document how I added the SQL Project to Visual Studio and how to modify, use, and deploy it.
Site: novanorth.org
Database Name: DB_12824_registration
Version: MS SQL 2008 R2
Database Server: s06.winhost.com
Database User: DB_12824_registration_user
Assigned Quota: 25 MB
Connection String: "Data Source=tcp:s06.winhost.com;Initial Catalog=DB_12824_registration;User ID=DB_12824_registration_user;Password=******;Integrated Security=False;"
- Open a PowerShell prompt.
docker pull mcr.microsoft.com/mssql/server:2022-latest
docker volume create sql-volume
$mssql_sa_password = ""
docker run -e 'ACCEPT_EULA=Y' -e "MSSQL_SA_PASSWORD=$mssql_sa_password" -p 1433:1433 --name sql1 --hostname sql1 --mount "source=sql-volume,target=/sqldata" -d mcr.microsoft.com/mssql/server:2022-latest
docker exec -it -u 0 sql1 "bash" # -u 0 lets us log in as root.
chmod 777 /sqldata
docker container exec sql1 /opt/mssql-tools/bin/sqlcmd -U sa -P "$mssql_sa_password" -Q "CREATE DATABASE [DB_12824_registration] ON PRIMARY ( NAME = N'DB_12824_registration_data', FILENAME = N'/sqldata/DB_12824_registration_data.mdf' , SIZE = 4160KB , MAXSIZE = 25600KB , FILEGROWTH = 1024KB ) LOG ON ( NAME = N'DB_12824_registration_log', FILENAME = N'/sqldata/DB_12824_registration_log.ldf' , SIZE = 1024KB , MAXSIZE = 1024000KB , FILEGROWTH = 65536KB );"
docker cp "2022-08-06 - NoVA North Production Database Export Script.sql" sql1:/sqldata
docker container exec sql1 /opt/mssql-tools/bin/sqlcmd -U sa -P "$mssql_sa_password" -i "/sqldata/2022-08-06 - NoVA North Production Database Export Script.sql"
This will create a Mermaid database schema diagram from your SQL Server database.
-
Download latest version: Release v0.4.1 � KarnerTh/mermerd � GitHub
-
Unzip it.
-
Make sure your SQL Server database is up, e.g., in Docker.
-
Run the following command:
Downloads\mermerd_0.4.1_windows_amd64.tar\mermerd -c "sqlserver://sa:<password>@localhost:1433?database=DB_12824_registration" -s dbo --useAllTables -o OdysseySchema.mmd
-
You will find your file created as OdysseySchema.mmd in the directory where you ran the tool.
docker stop sql1 ; docker rm sql1
- Navigate to Application Starting Point.
- Click "Create".
- Enter "/test" as the subdirectory.
- Click "Create".
- You should see a message that the site was created successfully.
- TODO: Add instructions.
- TODO: Add instructions.
- TODO: Add instructions.
- I rolled back to EF 4.4 to make sure everything worked. See if the code works as-is with EF 6.x.