Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

isaac-allef/typeorm-inheritance

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 👋

About

Learn how to implement inheritance in TypeORM.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.