https://github.com/ximtech/altium-migrator
Spring boot application for automated Altium component migrations
https://github.com/ximtech/altium-migrator
altium-designer migration-tool
Last synced: about 2 months ago
JSON representation
Spring boot application for automated Altium component migrations
- Host: GitHub
- URL: https://github.com/ximtech/altium-migrator
- Owner: ximtech
- License: mit
- Created: 2022-12-26T14:01:56.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-01T14:16:34.000Z (over 2 years ago)
- Last Synced: 2024-07-30T16:51:52.936Z (almost 2 years ago)
- Topics: altium-designer, migration-tool
- Language: Groovy
- Homepage:
- Size: 370 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Altium database migration tool
[](https://github.com/ximtech/altium-migrator/actions/workflows/build.yml)
The Altium database migration tool is a Spring boot application that helps handle changes from
[Git component repository](https://github.com/ximtech/altium-library) to local database for offline development
or any other hosted Postgres database by data source.
### How it works

1. User run docker command, then if application image is not in local storage it will be downloaded from public docker hub
2. The container will start with user provided DB connection or default for local development
3. After the start, application will fetch from repository migration scripts(database sql dump)
4. Then liquibase migration tool will check database state and update it if needed
5. Application can be run as many times as needed, it won't overwrite data or duplicate them.
### How to use it
1. First, download and install Docker here: [Download Docker Desktop for Windows](https://www.docker.com/products/docker-desktop/)
2. After Docker has been installed, check it with: `docker ps` in command prompt
3. Then need to signup/sign-in for Docker hub. Open Docker desktop and then `Sign in`:

4. Check login with command: `docker login`

5. Now when Docker has configured. Need to install PostgresDB for local environment
- ***First option.*** Run Database in container see [here](https://hub.docker.com/_/postgres)
- Run in command line: `docker pull postgres`, it will pull the latest Postgres image
- Run Database image:
```
docker run -d -p 5432:5432\
--name dev-postgres \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_USER=postgres \
-e POSTGRES_DB=altium-components \
postgres
```
- ***Second option.*** Download and install Postgres for local development [here](https://www.postgresql.org/download/windows/) -> `Download the installer`
- Download and install PgAdmin tool from [here](https://www.pgadmin.org/)
- Create empty Database:
- 
- In `Database` field write: `altium-components` -> `Save`
- Check that empty database has been created:
- 
6. ***Optionally:*** Create DB schema, or `altium` will be created as default schema. It will be used for all migrations
7. When all has been configured and empty Database created. Then run application
***Local development***
``` text
docker run -p 5432:5432 -e PROFILE=docker-dev ximtech/altium-migrator
```
***Custom Database Hosting***
***Note:*** For custom datasource do not change `PROFILE` variable
```text
docker run -p 5432:5432 \
-e PROFILE=prod \
-e ALTIUM_DB_DATASOURCE='jdbc:postgresql://host.docker.internal:5432/altium-components' \
-e ALTIUM_DB_USERNAME='postgres' \
-e ALTIUM_DB_PASSWORD='postgres' \
-e LIQUIBASE_SCHEMA_NAME=altium \
ximtech/altium-migrator:latest
```
7. At the end check that all data has been transferred:
- 
***Database Structure***
- 