Git Product home page Git Product logo

Comments (3)

artem-korolev avatar artem-korolev commented on September 6, 2024

yes. please

from spring-security-registration.

pjrola avatar pjrola commented on September 6, 2024

-- Create syntax for TABLE 'hibernate_sequence'
CREATE TABLE hibernate_sequence (
next_val bigint(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Create syntax for TABLE 'PasswordResetToken'
CREATE TABLE PasswordResetToken (
id bigint(20) NOT NULL,
expiryDate datetime(6) DEFAULT NULL,
token varchar(255) DEFAULT NULL,
user_id bigint(20) NOT NULL,
PRIMARY KEY (id),
KEY FKgdew0adk8xruaoq2rgdsy34w2 (user_id),
CONSTRAINT FKgdew0adk8xruaoq2rgdsy34w2 FOREIGN KEY (user_id) REFERENCES user_account (id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Create syntax for TABLE 'Privilege'
CREATE TABLE Privilege (
id bigint(20) NOT NULL,
name varchar(255) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Create syntax for TABLE 'Role'
CREATE TABLE Role (
id bigint(20) NOT NULL,
name varchar(255) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Create syntax for TABLE 'roles_privileges'
CREATE TABLE roles_privileges (
role_id bigint(20) NOT NULL,
privilege_id bigint(20) NOT NULL,
KEY FKp0x1d9k5aksyqd1akwwfkh0ki (privilege_id),
KEY FK2rfl694fu6ls2f2mqcxesqc6p (role_id),
CONSTRAINT FK2rfl694fu6ls2f2mqcxesqc6p FOREIGN KEY (role_id) REFERENCES Role (id),
CONSTRAINT FKp0x1d9k5aksyqd1akwwfkh0ki FOREIGN KEY (privilege_id) REFERENCES Privilege (id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Create syntax for TABLE 'user_account'
CREATE TABLE user_account (
id bigint(20) NOT NULL,
email varchar(255) DEFAULT NULL,
enabled bit(1) NOT NULL,
firstName varchar(255) DEFAULT NULL,
isUsing2FA bit(1) NOT NULL,
lastName varchar(255) DEFAULT NULL,
password varchar(60) DEFAULT NULL,
secret varchar(255) DEFAULT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Create syntax for TABLE 'users_roles'
CREATE TABLE users_roles (
user_id bigint(20) NOT NULL,
role_id bigint(20) NOT NULL,
KEY FKa9r8g5hiyy57ts5u4tkf0lbab (role_id),
KEY FKci4mdvg1fmo9eqmwno1y9o0fa (user_id),
CONSTRAINT FKa9r8g5hiyy57ts5u4tkf0lbab FOREIGN KEY (role_id) REFERENCES Role (id),
CONSTRAINT FKci4mdvg1fmo9eqmwno1y9o0fa FOREIGN KEY (user_id) REFERENCES user_account (id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Create syntax for TABLE 'VerificationToken'
CREATE TABLE VerificationToken (
id bigint(20) NOT NULL,
expiryDate datetime(6) DEFAULT NULL,
token varchar(255) DEFAULT NULL,
user_id bigint(20) NOT NULL,
PRIMARY KEY (id),
KEY FK_VERIFY_USER (user_id),
CONSTRAINT FK_VERIFY_USER FOREIGN KEY (user_id) REFERENCES user_account (id)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

from spring-security-registration.

lor6 avatar lor6 commented on September 6, 2024

Hey @unsekhable The database for the project is generated automatically based on the JPA entities and updated when there are any changes to the models. This is controlled by the property:
hibernate.hbm2ddl.auto=update
in persistence.properties.

You can enable logging for the SQL statements generated when creating the database by adding the property:
#logging.level.org.hibernate.SQL=DEBUG
in application.properties as described in this tutorial: https://www.baeldung.com/sql-logging-spring-boot

Cheers.

from spring-security-registration.

Related Issues (20)

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.