rado 1.3.0-preview.1 → 1.3.0-preview.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,6 +46,7 @@ var mysqlDiff = (hasTable) => {
46
46
  eq(Information.table_name, tableApi.name),
47
47
  eq(Information.table_schema, sql`database()`)
48
48
  );
49
+ if (columnInfo.length === 0) return tableApi.create().map(inline);
49
50
  const indexInfo = yield* tx.select({
50
51
  index_name: Statistics.index_name,
51
52
  column_name: Statistics.column_name,
@@ -107,6 +107,7 @@ var postgresDiff = (hasTable) => {
107
107
  notNull: and(def.notNull, isNull(def.identity)),
108
108
  defaultValue
109
109
  }).from(def);
110
+ if (columnInfo.length === 0) return tableApi.create().map(inline);
110
111
  const localColumns = new Map(
111
112
  columnInfo.map((column2) => {
112
113
  return [
@@ -28,6 +28,7 @@ var sqliteDiff = (targetTable) => {
28
28
  return txGenerator(function* (tx) {
29
29
  const tableApi = getTable(targetTable);
30
30
  const columnInfo = yield* tx.select(TableInfo).from(sql`pragma_table_info(${sql.inline(tableApi.name)}) as "TableInfo"`);
31
+ if (columnInfo.length === 0) return tableApi.create().map(inline);
31
32
  const indexInfo = yield* tx.select(SqliteMaster).from(sql`sqlite_master as "SqliteMaster"`).where(
32
33
  eq(SqliteMaster.tbl_name, tableApi.name),
33
34
  eq(SqliteMaster.type, "index")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rado",
3
- "version": "1.3.0-preview.1",
3
+ "version": "1.3.0-preview.2",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -40,7 +40,8 @@
40
40
  "test:node": "node --disable-warning=ExperimentalWarning --test-force-exit --test-concurrency=1 --test-reporter=spec --experimental-transform-types --test \"**/*.test.ts\"",
41
41
  "test:deno": "deno test --node-modules-dir=false --no-check -A --unstable-ffi",
42
42
  "docs:build": "bun docs/build.ts",
43
- "docs:dev": "bun docs/build.ts --serve"
43
+ "docs:dev": "bun docs/build.ts --serve",
44
+ "tag": "bun tag.ts"
44
45
  },
45
46
  "devDependencies": {
46
47
  "@alinea/suite": "^0.6.3",