Giter Site home page Giter Site logo

back-end-capitan-new's Introduction

La base de datos es Postgresql, luego de instarla crear las siguientes tablas:

CREATE TABLE projects ( project_id SERIAL PRIMARY KEY, name VARCHAR(255) NOT NULL, description TEXT, date DATE NOT NULL );

CREATE TABLE stages ( stage_id SERIAL PRIMARY KEY, description TEXT NOT NULL );

CREATE TABLE project_stages ( project_id INT NOT NULL, stage_id INT NOT NULL, assistant_id VARCHAR(50), stage_description TEXT, PRIMARY KEY (project_id, stage_id), FOREIGN KEY (project_id) REFERENCES projects (project_id), FOREIGN KEY (stage_id) REFERENCES stages (stage_id) );

CREATE TABLE threads ( thread_id SERIAL PRIMARY KEY, timestamp TIMESTAMP NOT NULL, stage_id INT NOT NULL, project_id INT NOT NULL, assistant_thread_id VARCHAR(100), -- Nuevo campo alfanumérico de 100 caracteres FOREIGN KEY (stage_id) REFERENCES stages (stage_id), FOREIGN KEY (project_id) REFERENCES projects (project_id) );

CREATE TABLE messages ( thread_id INT NOT NULL, message_id SERIAL PRIMARY KEY, message TEXT NOT NULL, timestamp TIMESTAMP NOT NULL, FOREIGN KEY (thread_id) REFERENCES threads (thread_id) );

back-end-capitan-new's People

Contributors

javier-pedernera avatar pcharras avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.