Database Deployment Via Web Console

Login 
Skip tour 
Create a new project 
Enter project name 
Add application 
Database in the Developer Catalog panel 
PostgreSQL template 
Instantiate template 
Enter database details 
Resources 
Open a web terminal psql postgresql://todo-db:5432/todo?user=pguserpsql (10.23) Type "help" for help. todo=#drop table if exists Todo; drop sequence if exists hibernate_sequence; create sequence hibernate_sequence start 1 increment 1; create table Todo ( id int8 not null, completed boolean not null, ordering int4, title varchar(255), url varchar(255), primary key (id) ); alter table if exists Todo add constraint unique_title unique (title); INSERT INTO todo(id, title, completed, ordering, url) VALUES (nextval('hibernate_sequence'), 'Introduction to Quarkus', true, 0, null); INSERT INTO todo(id, title, completed, ordering, url) VALUES (nextval('hibernate_sequence'), 'Hibernate with Panache', false, 1, null); INSERT INTO todo(id, title, completed, ordering, url) VALUES (nextval('hibernate_sequence'), 'Visit Quarkus web site', false, 2, 'https://quarkus.io'); INSERT INTO todo(id, title, completed, ordering, url) VALUES (nextval('hibernate_sequence'), 'Star Quarkus project', false, 3, 'https://github.com/quarkusio/quarkus/');todo=# drop table if exists Todo; NOTICE: table "todo" does not exist, skipping DROP TABLE todo=# drop sequence if exists hibernate_sequence; NOTICE: sequence "hibernate_sequence" does not exist, skipping DROP SEQUENCE todo=# create sequence hibernate_sequence start 1 increment 1; CREATE SEQUENCE todo=# create table Todo ( todo(# id int8 not null, todo(# completed boolean not null, todo(# ordering int4, todo(# title varchar(255), todo(# url varchar(255), todo(# primary key (id) todo(# ); CREATE TABLE todo=# alter table if exists Todo todo-# add constraint unique_title unique (title); ALTER TABLE todo=# INSERT INTO todo(id, title, completed, ordering, url) VALUES (nextval('hibernate_sequence'), 'Introduction to Quarkus', true, 0, null); INSERT 0 1 todo=# INSERT INTO todo(id, title, completed, ordering, url) VALUES (nextval('hibernate_sequence'), 'Hibernate with Panache', false, 1, null); INSERT 0 1 todo=# INSERT INTO todo(id, title, completed, ordering, url) VALUES (nextval('hibernate_sequence'), 'Visit Quarkus web site', false, 2, 'https://quarkus.io'); INSERT 0 1 todo=# INSERT INTO todo(id, title, completed, ordering, url) VALUES (nextval('hibernate_sequence'), 'Star Quarkus project', false, 3, 'https://github.com/quarkusio/quarkus/'); INSERT 0 1\dtList of relations Schema | Name | Type | Owner --------+------+-------+---------- public | todo | table | pguser (1 row)
Last updated