Skip to content

Judge and Tournament Registration for NoVA North Odyssey of the Mind

Notifications You must be signed in to change notification settings

RobertBernstein/OdysseyRegistration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Odyssey of the Mind Registration

Next Todos

  1. Create Elmah test DB

Overview

This repository contains the code for the Judge and Tournament Registration for NoVA North Odyssey of the Mind.

Technologies

It is currently built using ASP.NET MVC version 4.

Configuration

Files to Configure

Make sure to copy the web.config file from this directory into the root directory of your website.

  1. 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.

Hosting Company Configuration

  1. Make sure that the ASP.NET MVC website directory is set as an application starting point.
    1. Log into the Winhost Control Panel.
    2. Navigate to the Odyssey website.
    3. Navigate to the Sites List -> Site Manager -> Application Starting Point page.
    4. Make sure that the path to the directory containing the website is registered as an application starting point, e.g. /registration.

SQL Server Database

  1. Make sure to back up the database after every season (or before the next one).
  2. TODO: Document how I added the SQL Project to Visual Studio and how to modify, use, and deploy it.

Manage Database

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;"

Run the SQL Server database in a Docker container

  1. Open a PowerShell prompt.
  2. docker pull mcr.microsoft.com/mssql/server:2022-latest
  3. docker volume create sql-volume
  4. $mssql_sa_password = ""
  5. 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
  6. docker exec -it -u 0 sql1 "bash" # -u 0 lets us log in as root.
  7. chmod 777 /sqldata
  8. 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 );"
  9. docker cp "2022-08-06 - NoVA North Production Database Export Script.sql" sql1:/sqldata
  10. 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"

Generate the Odyssey database schema with mermerd

This will create a Mermaid database schema diagram from your SQL Server database.

  1. Download latest version: Release v0.4.1 � KarnerTh/mermerd � GitHub

  2. Unzip it.

  3. Make sure your SQL Server database is up, e.g., in Docker.

  4. 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

  5. You will find your file created as OdysseySchema.mmd in the directory where you ran the tool.

Shutdown and clean up the Docker container

docker stop sql1 ; docker rm sql1

Created the new test website

Created new "Application Starting Point" for the test website

  1. Navigate to Application Starting Point.
  2. Click "Create".
  3. Enter "/test" as the subdirectory.
  4. Click "Create".
  5. You should see a message that the site was created successfully.

Created new SQL registration database for the test website

  1. TODO: Add instructions.

Created new SQL Elmah database for the test website

  1. TODO: Add instructions.

Add connection strings for new SQL registration and Elmah test databases for the test website

  1. TODO: Add instructions.

TODO

  1. I rolled back to EF 4.4 to make sure everything worked. See if the code works as-is with EF 6.x.

About

Judge and Tournament Registration for NoVA North Odyssey of the Mind

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published