Skip to content

Latest commit

 

History

History
84 lines (54 loc) · 2.33 KB

README.md

File metadata and controls

84 lines (54 loc) · 2.33 KB

TypeORM Inheritance

Learn how to implement inheritance in TypeORM

📌 Table of Contents

🚀 Features

  • Use inheritance in order to create database schema

📙 Class Diagram

In order to better visualize the class inheritance scheme, I've created the following class diagram:

📋 Database Model

In order to understand how the database schema would look, I've created the following database models:

👷 Installation

You need to install Node.js and Yarn first, then in order to clone the project via HTTPS, run this command:

# Clone this repository
git clone https://github.com/isaac-allef/typeorm-inheritance.git

# Go into the repository
$ cd typeorm-inheritance

# Install dependencies
yarn install

Setup a database

Install Postgres to create a database or if you have Docker in your machine, fill the environment values related to database configurations and then run the following commands in order to create a Postgres container.

# Create postgres docker
$ sudo docker run --name typeorm-inheritance -e POSTGRES_PASSWORD=1234 -p 5433:5432 -d postgres

# Create 'users' database
$ CREATE DATABASE academy;

🏃 Getting Started

Run the transactions in order to configure the database schema

yarn typeorm migration:run

📮 Faq

Question: What are the tecnologies used in this project?

Answer: The tecnologies used in this project are NodeJS, Typescript and TypeORM

📕 License

📝 License

This project is under the MIT license. See the LICENSE for more information.


Made with ♥ by Isaac Allef 👋