You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository contains scripts to build the database from scratch.
3
+
This repository contains scripts to build the database from scratch and set all the configurations needed for you to be able running the game.
4
4
5
5
Brief explanation of the directory structure under `src`:
6
6
- data - Insert queries based on the current db state
@@ -9,19 +9,32 @@ Brief explanation of the directory structure under `src`:
9
9
- procedure - Stored procedures based on the current db state
10
10
- schema - Tables structure and constraints based on the current db state
11
11
12
+
12
13
### Prerequisite
13
14
14
-
- Any MSSQL Express Server (confirmed to be working with 2008 and 2022)
15
-
- Download the Express version from here: https://www.microsoft.com/en-us/sql-server/sql-server-downloads
16
-
- Download the latest MSSQL Management Studio: https://learn.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms
17
-
- Note that it can connect to any version of SQL Server, so even if you use 2008, just get the latest Management Studio for better development experience
18
-
- Powershell `sqlserver` module
19
-
- Open Powershell as Admin and run the following command: `Install-Module sqlserver -AllowClobber -Force`
20
-
- Note that if you're getting errors during the installation, it is likely because because your SQL installation installed its own powershell module which conflicts with the one we intend to use. They're incompatible and behave differently when creating db exports, hence you may want to delete it from your System Environment Variable `PSModulePath` and restart powershell to reload without these modules. Basically if you see in your `PSModulePath` environment variable something with `Microsoft SQL Server`, just remove it, since we want to use the module that we intend to use.
21
-
- Python and installing via pip the following packages (if you get errors, run powershell as admin):
22
-
- T-SQL code formatter: `pip install sqlfluff`
23
-
- MSSQL scripter: `pip install mssql-scripter`
24
-
- Note that if you're using [virtualenv](https://docs.python.org/3/library/venv.html) (recommended), you can simply install the requirements.txt.
15
+
- Being able to run powershell scripts. Note that if you're unable to run the scripts, it is because you need to allow powershell scripts to run on your system by setting the execution policy to bypass with the following powershell command: `Set-ExecutionPolicy Bypass -Scope CurrentUser`
16
+
- Microsoft SQL Server Express or Developer (confirmed to be working with versions 2022 and 2008)
-[Git](https://git-scm.com/download/win) (version 2.45.1 at the time of writing)
20
+
-[Python](https://www.python.org/downloads/) (version 3.12.3 at the time of writing)
21
+
- During installation in the `Advanced Options` make sure to tick `Add Python to environment variables`
22
+
- Once finished, install the required packages with the following command: `pip install -r requirements.txt`
23
+
24
+
25
+
### Getting Started
26
+
27
+
Before running the `import.ps1` script, check that the `$server_name` variable matches with your current server name. If you installed SQL Server using the default instance, then the default arguments should be working fine, otherwise you can provide the script an argument with your custom server name. You can run the following command in powershell to know the names of your current SQL Servers:
Once the import script finished importing the db, it will also invoke the `odbcad.ps1` script automatically for you to set odbc configurations so that the server files can connect with your db.
25
38
26
39
27
40
### Development
@@ -45,17 +58,3 @@ Release process should follow for every release we create in the [main ko projec
45
58
46
59
In other words, we use the `master` branch as the development and release branch, but when tagging, they are all fixed to a specific tag.
47
60
Maybe in the future this will change if it makes things difficult and we maintain a separate development branch.
48
-
49
-
### How to use
50
-
51
-
Before running the `import.ps1` script, check that the `$server_name` variable matches with your current server name. If you installed SQL Server using the default instance, then the defaults arguments should work, otherwise you can provide to the script an argument with your custom server name. You can run the following command in powershell to know the names of your current SQL Servers:
Once the import script finished importing the db, it will also invoke the `odbcad.ps1` script for you to automatically set odbc configurations so that the server files can connect with your db.
0 commit comments