cuba-platform / cuba-cli

CUBA Platform Development Command-Line Interface
https://www.cuba-platform.com/marketplace/cuba-cli/
Apache License 2.0
47 stars 8 forks source link

If project created with Studio and there is no create-db.sql scripts CLI should create them #108

Closed jreznot closed 6 years ago

jreznot commented 6 years ago

Environment

Description of the bug or enhancement

  1. Create project with Studio
  2. Try to create entity with CLI

CLI should create create-db.sql script

CLI prints:

Unable to find create script
jreznot commented 6 years ago

Reopened.

Please note that db directory most likely is not created too:

java.nio.file.NoSuchFileException: /home/artamonov/projects/crazy-monkey/modules/core/db/init/hsql/10.create-db.sql
        at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
        at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:215)
        at java.base/java.nio.file.Files.newByteChannel(Files.java:369)
        at java.base/java.nio.file.Files.createFile(Files.java:640)
        at com.haulmont.cuba.cli/com.haulmont.cuba.cli.cubaplugin.entity.CreateEntityCommand.createSqlScripts(CreateEntityCommand.kt:148)
        at com.haulmont.cuba.cli/com.haulmont.cuba.cli.cubaplugin.entity.CreateEntityCommand.generate(CreateEntityCommand.kt:127)
        at com.haulmont.cuba.cli/com.haulmont.cuba.cli.commands.GeneratorCommand.run(GeneratorCommand.kt:75)
        at com.haulmont.cuba.cli/com.haulmont.cuba.cli.commands.AbstractCommand.execute(AbstractCommand.kt:34)
        at com.haulmont.cuba.cli/com.haulmont.cuba.cli.ShellCli.evalCommand(ShellCli.kt:116)
        at com.haulmont.cuba.cli/com.haulmont.cuba.cli.ShellCli.run(ShellCli.kt:108)
        at com.haulmont.cuba.cli/com.haulmont.cuba.cli.EntryPointKt.main(EntryPoint.kt:112)