This repository contains the SQL Server database schema for the Amateur Repeater Directory project.
It is published as a Visual Studio SQL Server Database Project.
Each table, view, and stored procedure is its own .sql file for easy browsing and version control.
Building the project produces a portable .dacpac that can be deployed to SQL Server.
-
SQL Server 2022 Developer Edition (free)
👉 https://www.microsoft.com/en-us/sql-server/sql-server-downloads -
SQL Server Management Studio (SSMS) v20 or later
👉 https://aka.ms/ssmsfullsetup -
Visual Studio Community 2022 or later with SQL Server Data Tools (SSDT)
👉 https://visualstudio.microsoft.com/vs/community/If Visual Studio is already installed, open Visual Studio Installer → Modify → Workloads → Data storage and processing (SQL Server Data Tools).
You can clone the repository in two ways:
-
Open Visual Studio.
-
On the start window, click Clone a repository.
-
In the “Repository location” box, paste:
https://github.com/AmateurRepeaterDirectory/ARD-Database.git -
Choose a local path on your computer where you want the project saved.
-
Click Clone. Visual Studio will fetch the repo and open the solution.
git clone https://github.com/AmateurRepeaterDirectory/ARD-Database.git
cd ARD-Database-
Launch Visual Studio.
-
Open the solution file:
ARD_Database.sln. -
In Solution Explorer, right-click the ARD_Database project → Build.
-
After a successful build, look in:
/bin/Debug/
You’ll find:
ARD_Database.dacpac→ compiled database packageARD_Database.sql→ (optional) full deployment script
You can deploy the schema into your own SQL Server instance in two ways.
-
Open SSMS and connect to your SQL Server 2022 instance.
-
Right-click Databases → Deploy Data-tier Application…
-
Select
ARD_Database.dacpac(from/bin/Debug/). -
For the database name, enter:
AmateurRepeaterDirectory -
Click Finish. SSMS will create all objects in the correct order.
- In Visual Studio, right-click the project → Publish…
- Edit the connection to point to your SQL Server instance.
- Check Generate Script (instead of publishing directly).
- Save the script, open it in SSMS, and run it against a database named
AmateurRepeaterDirectory.
When the schema changes:
- Pull the latest changes from this repo.
- Open the solution in Visual Studio and Build.
- Right-click project → Publish… → Generate Script (don’t execute from VS).
- Review the generated script.
- Run it in SSMS on your existing
AmateurRepeaterDirectorydatabase.
Safety tips
- Keep Block on data loss enabled unless you intend to drop/alter columns.
- Do not use Always re-create database on production.
- Always review scripts before executing.
/ARD_Database.sln Visual Studio solution
/ARD_Database/ Database project
dbo/
Tables/ One .sql per table
Views/ One .sql per view
Stored Procedures/ One .sql per stored procedure
User Defined Types/ Scalar/table types
Properties/ Project settings
References/ External references (if any)
/docs/ Optional diagrams or docs
- Each object lives in its own
.sqlfile for clean diffs and PRs. bin/andobj/are build outputs (should not be committed).
By default, this project contains schema only.
If you need initial rows (e.g., lookup values like modes or offset types):
- Add them to a Post-Deployment Script inside the project, or
- Provide
.sql/.csvfiles under/data/seed/and run them manually.
No production data is included in this repository.
- Edit schema in the project’s
.sqlfiles. - Build → produces a new
.dacpac. - Publish → Generate Script → review and run in SSMS.
- Commit
.sqlobject changes to GitHub. - (Optional) Create a GitHub Release and attach the
.dacpacfor easy download.
-
Can’t find the
.dacpac?
Make sure you built the project; check/bin/Debug/or/bin/Release/. -
Foreign key / ordering errors when deploying?
Deploy via the .dacpac or use a script generated by SSDT. These handle object dependency order automatically. -
Database shows compatibility level 150 (SQL 2019) on a 2022 instance?
Set it to 160:ALTER DATABASE [AmateurRepeaterDirectory] SET COMPATIBILITY_LEVEL = 160;
- Database schema: Apache-2.0
Pull requests are welcome.
- Fork the repo.
- Make your schema changes in the project’s
.sqlfiles. - Build to ensure it compiles.
- Open a PR with a clear description of the change.