SQLITE_ERROR SQL错误或缺少数据库(“SCHEMA”附近:语法错误)

时间:2018-01-26 12:37:27

标签: sql sqlite sbt

我正在尝试在SQLite DB上运行此脚本(在我的SBT项目中),但是我收到了这个错误?

[2018-01-25 22:18:58] [1] [SQLITE_ERROR] SQL error or missing 
     database (near "SCHEMA": syntax error)

你知道我该如何解决它?

# Air SCHEMA

# --- !Ups

CREATE TABLE products (
  id          BIGSERIAL    NOT NULL PRIMARY KEY,
  title       VARCHAR(254) NOT NULL,
  description VARCHAR(254) NOT NULL,
  price       BIGINT(2500) NOT NULL
);


CREATE INDEX products._idx
  ON products (id);

# --- !Downs

DROP TABLE products;

1 个答案:

答案 0 :(得分:2)

您应该使用SQL注释:

var exec = require("child_process").exec;//require child_process.exec

exec("soxi -D /path/to/audio.wav", function(err, stdout){
    if (err){
         throw err;
}
var audioDuration = stdout * 1000; //takes audio length in seconds and converts to milliseconds
console.log("This is the Audio Duration:" + audioDuration);//Prints
});

而不是Python评论:

-- Air SCHEMA
相关问题