Skip to content

Creative-Players/developer-full-stack-challenge

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alt Text

login credentials

name: jack password: 123456

scripts

postgresql

run backend

src/api uvicorn app.main:app --port 8100 --reload

run frontend

src/dashboard num run dev

database - postgresql

make migration

src/api/
alembic revision --autogenerate -m "initial migration"

run migration

src/api/ alembic upgrade head

do seed data

src/api/ python seeder.py

using pgadmin4 for browser database

sudo /usr/pgadmin4/bin/setup-web.sh sudo systemctl start pgadmin4

on browser, http://localhost/pgadmin4

basic migration but follow the above step to make migration.

-- Table: public.authors

-- DROP TABLE IF EXISTS public.authors;

CREATE TABLE IF NOT EXISTS public.authors
(
    id integer NOT NULL DEFAULT nextval('authors_id_seq'::regclass),
    name character varying COLLATE pg_catalog."default",
    CONSTRAINT authors_pkey PRIMARY KEY (id)
)

-- Table: public.books

-- DROP TABLE IF EXISTS public.books;

CREATE TABLE IF NOT EXISTS public.books
(
    id integer NOT NULL DEFAULT nextval('books_id_seq'::regclass),
    name character varying(100) COLLATE pg_catalog."default",
    pages integer,
    owner_id integer,
    CONSTRAINT books_pkey PRIMARY KEY (id),
    CONSTRAINT books_owner_id_fkey FOREIGN KEY (owner_id)
        REFERENCES public.authors (id) MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION
)


-- Table: public.users

-- DROP TABLE IF EXISTS public.users;

CREATE TABLE IF NOT EXISTS public.users
(
    id integer NOT NULL DEFAULT nextval('users_id_seq'::regclass),
    name character varying(100) COLLATE pg_catalog."default",
    password character varying COLLATE pg_catalog."default",
    CONSTRAINT users_pkey PRIMARY KEY (id)
)


About

fastAPI and nuxt2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Vue 42.2%
  • Python 32.9%
  • JavaScript 22.7%
  • Other 2.2%