Skip to content

h2 not run schema.sql when start #7933

@Dreampie

Description

@Dreampie
spring:
    profiles: dev
    datasource:
      schema: classpath:db/schema.sql
      url: jdbc:h2:~/h2/test;MODE=MySql
      driver-class-name: org.h2.Driver
      username: sa
      initialize: true
    h2:
      console:
        enabled: true
CREATE TABLE alc_city (
  id          INT PRIMARY KEY AUTO_INCREMENT,
  name        VARCHAR,
  state       VARCHAR,
  country     VARCHAR,
  delete_able INT,
  deleted_at  TIMESTAMP
);

INSERT INTO alc_city (name, state, country, delete_able, deleted_at)
VALUES ('San Francisco', 'CA', 'US', 1, '2016-10-10 10:11:20');

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions