Skip to content
This repository was archived by the owner on Apr 23, 2024. It is now read-only.
This repository was archived by the owner on Apr 23, 2024. It is now read-only.

Error: Unsupported ID type "DateTime" #35

Description

@divyenduz

Fails for Joomla table:

https://github.com/prisma/database-schema-examples/blob/master/mysql/joomla/schema.sql#L137-L156

CREATE TABLE `zfah5_banner_clients` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `contact` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `extrainfo` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `state` tinyint(3) NOT NULL DEFAULT '0',
  `checked_out` int(10) unsigned NOT NULL DEFAULT '0',
  `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `metakey` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `own_prefix` tinyint(4) NOT NULL DEFAULT '0',
  `metakey_prefix` varchar(400) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `purchase_type` tinyint(4) NOT NULL DEFAULT '-1',
  `track_clicks` tinyint(4) NOT NULL DEFAULT '-1',
  `track_impressions` tinyint(4) NOT NULL DEFAULT '-1',
  PRIMARY KEY (`id`),
  KEY `idx_own_prefix` (`own_prefix`),
  KEY `idx_metakey_prefix` (`metakey_prefix`(100))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

Introspected model:

model zfah5_banner_clients {
  checked_out       Int      @default(0)
  checked_out_time  DateTime
  contact           String   @default("")
  email             String   @default("")
  extrainfo         String
  id                Int      @default(autoincrement()) @id
  metakey           String
  metakey_prefix    String   @default("")
  name              String   @default("")
  own_prefix        Int      @default(0)
  purchase_type     Int
  state             Int      @default(0)
  track_clicks      Int
  track_impressions Int

  @@index([metakey_prefix], name: "idx_metakey_prefix")
  @@index([own_prefix], name: "idx_own_prefix")
}

This is most likely a test-utils bug as it is not reproducible directly with client when using the same call.

All seed logs: https://github.com/prisma/introspection-engine-output/blob/test_utils/test-utils/results/mysql_public_test_utils_joomla_stderr.log#L703

/home/runner/work/introspection-engine-output/introspection-engine-output/clients/mysql_public_test_utils/joomla
===start client generation===
2020-03-11T12:12:59.473Z prisma-client {
  engineConfig: {
    cwd: '/home/runner/work/introspection-engine-output/introspection-engine-output/mysql_public_test_utils',
    debug: false,
    datamodelPath: '/home/runner/work/introspection-engine-output/introspection-engine-output/clients/mysql_public_test_utils/joomla/schema.prisma',
    prismaPath: undefined,
    datasources: [],
    generator: {
      name: 'client',
      provider: 'prisma-client-js',
      output: '/home/runner/work/introspection-engine-output/introspection-engine-output/clients/mysql_public_test_utils/joomla',
      binaryTargets: [],
      config: {}
    },
    showColors: false,
    logLevel: undefined,
    logQueries: undefined,
    env: {},
    flags: []
  }
}
===end client generation===
===start seed===
2020-03-11T12:12:59.589Z prisma-client Prisma Client call:
2020-03-11T12:12:59.590Z prisma-client prisma.zfah5_action_logs.create({
  data: {
    extension: 'ofosid',
    ip_address: 'daej',
    item_id: 405,
    log_date: new Date('2091-02-19T00:03:58.721Z'),
    message: 'gafgohrak',
    message_language_key: 'ro',
    user_id: -401
  }
})
2020-03-11T12:12:59.590Z prisma-client Generated request:
2020-03-11T12:12:59.590Z prisma-client mutation {
  createOnezfah5_action_logs(data: {
    extension: "ofosid"
    ip_address: "daej"
    item_id: 405
    log_date: "2091-02-19T00:03:58.721Z"
    message: "gafgohrak"
    message_language_key: "ro"
    user_id: -401
  }) {
    extension
    id
    ip_address
    item_id
    log_date
    message
    message_language_key
    user_id
  }
}

2020-03-11T12:12:59.593Z engine {
  PRISMA_DML_PATH: '/home/runner/work/introspection-engine-output/introspection-engine-output/clients/mysql_public_test_utils/joomla/schema.prisma',
  PORT: '43455',
  RUST_BACKTRACE: '1',
  RUST_LOG: 'info',
  OVERWRITE_DATASOURCES: '[]'
}
2020-03-11T12:12:59.594Z engine {
  cwd: '/home/runner/work/introspection-engine-output/introspection-engine-output/mysql_public_test_utils'
}
2020-03-11T12:12:59.596Z getos { version: 'OpenSSL 1.1.1d  10 Sep 2019\n' }
2020-03-11T12:12:59.596Z getos { ls: '' }
2020-03-11T12:12:59.598Z getos { platform: 'linux', libssl: '1.1.x' }
2020-03-11T12:12:59.598Z plusX Execution permissions of /home/runner/work/introspection-engine-output/introspection-engine-output/clients/mysql_public_test_utils/joomla/runtime/query-engine-debian-openssl-1.1.x are fine
2020-03-11T12:12:59.599Z engine { flags: [ '--enable-raw-queries' ] }
2020-03-11T12:12:59.616Z engine stderr Printing to stderr for debugging
2020-03-11T12:12:59.617Z engine stderr Listening on 127.0.0.1:43455
2020-03-11T12:12:59.629Z engine stdout {
  timestamp: 'Mar 11 12:12:59.628',
  level: 'INFO',
  target: 'quaint::pooled',
  fields: { message: 'Starting a mysql pool with 5 connections.' }
}
2020-03-11T12:12:59.642Z engine stdout {
  timestamp: 'Mar 11 12:12:59.642',
  level: 'INFO',
  target: 'prisma::server',
  fields: {
    message: 'Started http server on 127.0.0.1:43455',
    'log.target': 'prisma::server',
    'log.module_path': 'prisma::server',
    'log.file': 'query-engine/prisma/src/server.rs',
    'log.line': 95
  }
}
2020-03-11T12:13:00.773Z prisma-client Prisma Client call:
2020-03-11T12:13:00.774Z prisma-client prisma.zfah5_action_logs.create({
  data: {
    extension: 'ju',
    ip_address: 'nataj',
    item_id: 57,
    log_date: new Date('2079-12-15T01:51:36.680Z'),
    message: 'ca',
    message_language_key: 'unukaho',
    user_id: -1036
  }
})
2020-03-11T12:13:00.774Z prisma-client Generated request:
2020-03-11T12:13:00.774Z prisma-client mutation {
  createOnezfah5_action_logs(data: {
    extension: "ju"
    ip_address: "nataj"
    item_id: 57
    log_date: "2079-12-15T01:51:36.680Z"
    message: "ca"
    message_language_key: "unukaho"
    user_id: -1036
  }) {
    extension
    id
    ip_address
    item_id
    log_date
    message
    message_language_key
    user_id
  }
}

2020-03-11T12:13:01.244Z prisma-client Prisma Client call:
2020-03-11T12:13:01.244Z prisma-client prisma.zfah5_action_logs_extensions.create({
  data: {
    extension: 'dolbaw'
  }
})
2020-03-11T12:13:01.244Z prisma-client Generated request:
2020-03-11T12:13:01.244Z prisma-client mutation {
  createOnezfah5_action_logs_extensions(data: {
    extension: "dolbaw"
  }) {
    extension
    id
  }
}

2020-03-11T12:13:01.900Z prisma-client Prisma Client call:
2020-03-11T12:13:01.900Z prisma-client prisma.zfah5_action_logs_extensions.create({
  data: {
    extension: 'gokim'
  }
})
2020-03-11T12:13:01.900Z prisma-client Generated request:
2020-03-11T12:13:01.900Z prisma-client mutation {
  createOnezfah5_action_logs_extensions(data: {
    extension: "gokim"
  }) {
    extension
    id
  }
}

2020-03-11T12:13:02.369Z prisma-client Prisma Client call:
2020-03-11T12:13:02.370Z prisma-client prisma.zfah5_action_logs_users.create({
  data: {
    extensions: 'sab',
    notify: 1879,
    user_id: 4
  }
})
2020-03-11T12:13:02.370Z prisma-client Generated request:
2020-03-11T12:13:02.370Z prisma-client mutation {
  createOnezfah5_action_logs_users(data: {
    extensions: "sab"
    notify: 1879
    user_id: 4
  }) {
    extensions
    notify
    user_id
  }
}

2020-03-11T12:13:03.027Z prisma-client Prisma Client call:
2020-03-11T12:13:03.028Z prisma-client prisma.zfah5_action_logs_users.create({
  data: {
    extensions: 'nukonokan',
    notify: -1216,
    user_id: 5
  }
})
2020-03-11T12:13:03.028Z prisma-client Generated request:
2020-03-11T12:13:03.028Z prisma-client mutation {
  createOnezfah5_action_logs_users(data: {
    extensions: "nukonokan"
    notify: -1216
    user_id: 5
  }) {
    extensions
    notify
    user_id
  }
}

2020-03-11T12:13:03.498Z prisma-client Prisma Client call:
2020-03-11T12:13:03.499Z prisma-client prisma.zfah5_action_log_config.create({
  data: {
    id_holder: 'uhlog',
    table_name: 'sezsi',
    text_prefix: 'ju',
    title_holder: 'bu',
    type_alias: 'mahbu',
    type_title: 'wot'
  }
})
2020-03-11T12:13:03.499Z prisma-client Generated request:
2020-03-11T12:13:03.499Z prisma-client mutation {
  createOnezfah5_action_log_config(data: {
    id_holder: "uhlog"
    table_name: "sezsi"
    text_prefix: "ju"
    title_holder: "bu"
    type_alias: "mahbu"
    type_title: "wot"
  }) {
    id
    id_holder
    table_name
    text_prefix
    title_holder
    type_alias
    type_title
  }
}

2020-03-11T12:13:04.164Z prisma-client Prisma Client call:
2020-03-11T12:13:04.164Z prisma-client prisma.zfah5_action_log_config.create({
  data: {
    id_holder: 'cujduvtih',
    table_name: 'le',
    text_prefix: 'votevned',
    title_holder: 'esohogbi',
    type_alias: 'dadeip',
    type_title: 'riide'
  }
})
2020-03-11T12:13:04.164Z prisma-client Generated request:
2020-03-11T12:13:04.164Z prisma-client mutation {
  createOnezfah5_action_log_config(data: {
    id_holder: "cujduvtih"
    table_name: "le"
    text_prefix: "votevned"
    title_holder: "esohogbi"
    type_alias: "dadeip"
    type_title: "riide"
  }) {
    id
    id_holder
    table_name
    text_prefix
    title_holder
    type_alias
    type_title
  }
}

2020-03-11T12:13:04.634Z prisma-client Prisma Client call:
2020-03-11T12:13:04.634Z prisma-client prisma.zfah5_assets.create({
  data: {
    level: 418,
    lft: -359,
    name: 'gewse',
    parent_id: 779,
    rgt: -1355,
    rules: 'tuhdulhak',
    title: 'retijic'
  }
})
2020-03-11T12:13:04.634Z prisma-client Generated request:
2020-03-11T12:13:04.634Z prisma-client mutation {
  createOnezfah5_assets(data: {
    level: 418
    lft: -359
    name: "gewse"
    parent_id: 779
    rgt: -1355
    rules: "tuhdulhak"
    title: "retijic"
  }) {
    id
    level
    lft
    name
    parent_id
    rgt
    rules
    title
  }
}

2020-03-11T12:13:05.293Z prisma-client Prisma Client call:
2020-03-11T12:13:05.293Z prisma-client prisma.zfah5_assets.create({
  data: {
    level: -912,
    lft: -1089,
    name: 'bueh',
    parent_id: -1973,
    rgt: -1342,
    rules: 'mifdej',
    title: 'fef'
  }
})
2020-03-11T12:13:05.293Z prisma-client Generated request:
2020-03-11T12:13:05.293Z prisma-client mutation {
  createOnezfah5_assets(data: {
    level: -912
    lft: -1089
    name: "bueh"
    parent_id: -1973
    rgt: -1342
    rules: "mifdej"
    title: "fef"
  }) {
    id
    level
    lft
    name
    parent_id
    rgt
    rules
    title
  }
}

2020-03-11T12:13:05.764Z prisma-client Prisma Client call:
2020-03-11T12:13:05.764Z prisma-client prisma.zfah5_associations.create({
  data: {
    context: '3361fb0e-0de6-526e-ae0a-e4031aaef95d',
    id: 10,
    key: 'riumso'
  }
})
2020-03-11T12:13:05.764Z prisma-client Generated request:
2020-03-11T12:13:05.764Z prisma-client mutation {
  createOnezfah5_associations(data: {
    context: "3361fb0e-0de6-526e-ae0a-e4031aaef95d"
    id: 10
    key: "riumso"
  }) {
    context
    id
    key
  }
}

2020-03-11T12:13:06.422Z prisma-client Prisma Client call:
2020-03-11T12:13:06.422Z prisma-client prisma.zfah5_associations.create({
  data: {
    context: 'b7fdd67f-2505-5138-a78c-f3c6a84f5da6',
    id: 11,
    key: 'hepgu'
  }
})
2020-03-11T12:13:06.422Z prisma-client Generated request:
2020-03-11T12:13:06.422Z prisma-client mutation {
  createOnezfah5_associations(data: {
    context: "b7fdd67f-2505-5138-a78c-f3c6a84f5da6"
    id: 11
    key: "hepgu"
  }) {
    context
    id
    key
  }
}

2020-03-11T12:13:06.894Z prisma-client Prisma Client call:
2020-03-11T12:13:06.895Z prisma-client prisma.zfah5_banners.create({
  data: {
    alias: 'liedowa',
    catid: -1164,
    checked_out: 1699,
    checked_out_time: new Date('2108-07-22T06:13:39.174Z'),
    cid: 1269,
    clicks: 1929,
    clickurl: 'regduw',
    created: new Date('2110-07-28T15:11:20.278Z'),
    created_by: -603,
    created_by_alias: 'ewumovecu',
    custombannercode: 'iro',
    description: 'lavub',
    impmade: -865,
    imptotal: -1357,
    language: 'pol',
    metakey: 'harhi',
    metakey_prefix: 'ze',
    modified: new Date('2095-08-27T17:39:18.568Z'),
    modified_by: 170,
    name: 'log',
    ordering: -998,
    own_prefix: true,
    params: 'ukiipi',
    publish_down: new Date('2055-10-16T15:34:40.492Z'),
    publish_up: new Date('2039-11-07T17:29:16.572Z'),
    purchase_type: -1903,
    reset: new Date('2085-10-02T04:59:56.469Z'),
    state: 1816,
    sticky: -882,
    track_clicks: 1660,
    track_impressions: 1534,
    type: -519,
    version: 991
  }
})
2020-03-11T12:13:06.895Z prisma-client Generated request:
2020-03-11T12:13:06.895Z prisma-client mutation {
  createOnezfah5_banners(data: {
    alias: "liedowa"
    catid: -1164
    checked_out: 1699
    checked_out_time: "2108-07-22T06:13:39.174Z"
    cid: 1269
    clicks: 1929
    clickurl: "regduw"
    created: "2110-07-28T15:11:20.278Z"
    created_by: -603
    created_by_alias: "ewumovecu"
    custombannercode: "iro"
    description: "lavub"
    impmade: -865
    imptotal: -1357
    language: "pol"
    metakey: "harhi"
    metakey_prefix: "ze"
    modified: "2095-08-27T17:39:18.568Z"
    modified_by: 170
    name: "log"
    ordering: -998
    own_prefix: true
    params: "ukiipi"
    publish_down: "2055-10-16T15:34:40.492Z"
    publish_up: "2039-11-07T17:29:16.572Z"
    purchase_type: -1903
    reset: "2085-10-02T04:59:56.469Z"
    state: 1816
    sticky: -882
    track_clicks: 1660
    track_impressions: 1534
    type: -519
    version: 991
  }) {
    alias
    catid
    checked_out
    checked_out_time
    cid
    clicks
    clickurl
    created
    created_by
    created_by_alias
    custombannercode
    description
    id
    impmade
    imptotal
    language
    metakey
    metakey_prefix
    modified
    modified_by
    name
    ordering
    own_prefix
    params
    publish_down
    publish_up
    purchase_type
    reset
    state
    sticky
    track_clicks
    track_impressions
    type
    version
  }
}

2020-03-11T12:13:07.560Z prisma-client Prisma Client call:
2020-03-11T12:13:07.561Z prisma-client prisma.zfah5_banners.create({
  data: {
    alias: 'ohi',
    catid: 211,
    checked_out: 1867,
    checked_out_time: new Date('2117-07-31T20:04:17.305Z'),
    cid: -460,
    clicks: -1237,
    clickurl: 'kiliov',
    created: new Date('2113-09-18T01:05:12.615Z'),
    created_by: 685,
    created_by_alias: 'fejuhera',
    custombannercode: 'lihakhup',
    description: 'patofcok',
    impmade: 1183,
    imptotal: -1797,
    language: 'kajdinbel',
    metakey: 'uhu',
    metakey_prefix: 'bebah',
    modified: new Date('2074-05-04T07:31:49.769Z'),
    modified_by: -914,
    name: 'tic',
    ordering: 1368,
    own_prefix: true,
    params: 'mir',
    publish_down: new Date('2033-08-23T03:58:58.516Z'),
    publish_up: new Date('2052-09-02T19:23:16.433Z'),
    purchase_type: -244,
    reset: new Date('2027-09-08T00:11:57.080Z'),
    state: 1344,
    sticky: -287,
    track_clicks: 784,
    track_impressions: 754,
    type: -364,
    version: -1768
  }
})
2020-03-11T12:13:07.561Z prisma-client Generated request:
2020-03-11T12:13:07.561Z prisma-client mutation {
  createOnezfah5_banners(data: {
    alias: "ohi"
    catid: 211
    checked_out: 1867
    checked_out_time: "2117-07-31T20:04:17.305Z"
    cid: -460
    clicks: -1237
    clickurl: "kiliov"
    created: "2113-09-18T01:05:12.615Z"
    created_by: 685
    created_by_alias: "fejuhera"
    custombannercode: "lihakhup"
    description: "patofcok"
    impmade: 1183
    imptotal: -1797
    language: "kajdinbel"
    metakey: "uhu"
    metakey_prefix: "bebah"
    modified: "2074-05-04T07:31:49.769Z"
    modified_by: -914
    name: "tic"
    ordering: 1368
    own_prefix: true
    params: "mir"
    publish_down: "2033-08-23T03:58:58.516Z"
    publish_up: "2052-09-02T19:23:16.433Z"
    purchase_type: -244
    reset: "2027-09-08T00:11:57.080Z"
    state: 1344
    sticky: -287
    track_clicks: 784
    track_impressions: 754
    type: -364
    version: -1768
  }) {
    alias
    catid
    checked_out
    checked_out_time
    cid
    clicks
    clickurl
    created
    created_by
    created_by_alias
    custombannercode
    description
    id
    impmade
    imptotal
    language
    metakey
    metakey_prefix
    modified
    modified_by
    name
    ordering
    own_prefix
    params
    publish_down
    publish_up
    purchase_type
    reset
    state
    sticky
    track_clicks
    track_impressions
    type
    version
  }
}

2020-03-11T12:13:08.042Z prisma-client Prisma Client call:
2020-03-11T12:13:08.042Z prisma-client prisma.zfah5_banner_clients.create({
  data: {
    checked_out: -1307,
    checked_out_time: new Date('2035-11-14T06:14:32.093Z'),
    contact: 'vutuwom',
    email: 'wibse',
    extrainfo: 'daj',
    metakey: 'ca',
    metakey_prefix: 'ez',
    name: 'nazinef',
    own_prefix: -141,
    purchase_type: -265,
    state: 599,
    track_clicks: -406,
    track_impressions: -1808
  }
})
2020-03-11T12:13:08.042Z prisma-client Generated request:
2020-03-11T12:13:08.043Z prisma-client mutation {
  createOnezfah5_banner_clients(data: {
    checked_out: -1307
    checked_out_time: "2035-11-14T06:14:32.093Z"
    contact: "vutuwom"
    email: "wibse"
    extrainfo: "daj"
    metakey: "ca"
    metakey_prefix: "ez"
    name: "nazinef"
    own_prefix: -141
    purchase_type: -265
    state: 599
    track_clicks: -406
    track_impressions: -1808
  }) {
    checked_out
    checked_out_time
    contact
    email
    extrainfo
    id
    metakey
    metakey_prefix
    name
    own_prefix
    purchase_type
    state
    track_clicks
    track_impressions
  }
}

2020-03-11T12:13:08.698Z prisma-client Prisma Client call:
2020-03-11T12:13:08.698Z prisma-client prisma.zfah5_banner_clients.create({
  data: {
    checked_out: 464,
    checked_out_time: new Date('2084-12-28T01:15:22.015Z'),
    contact: 'pivvod',
    email: 'opbun',
    extrainfo: 'anoso',
    metakey: 'am',
    metakey_prefix: 'tettufja',
    name: 'la',
    own_prefix: -1845,
    purchase_type: -1623,
    state: 473,
    track_clicks: 732,
    track_impressions: -654
  }
})
2020-03-11T12:13:08.698Z prisma-client Generated request:
2020-03-11T12:13:08.698Z prisma-client mutation {
  createOnezfah5_banner_clients(data: {
    checked_out: 464
    checked_out_time: "2084-12-28T01:15:22.015Z"
    contact: "pivvod"
    email: "opbun"
    extrainfo: "anoso"
    metakey: "am"
    metakey_prefix: "tettufja"
    name: "la"
    own_prefix: -1845
    purchase_type: -1623
    state: 473
    track_clicks: 732
    track_impressions: -654
  }) {
    checked_out
    checked_out_time
    contact
    email
    extrainfo
    id
    metakey
    metakey_prefix
    name
    own_prefix
    purchase_type
    state
    track_clicks
    track_impressions
  }
}

Error: Unsupported ID type "DateTime"
    at getMockDataForField (/home/runner/work/introspection-engine-output/prisma-test-utils/src/static/seed.ts:1072:21)
    at Array.reduce (<anonymous>)
    at getMockForTask (/home/runner/work/introspection-engine-output/prisma-test-utils/src/static/seed.ts:986:10)
    at /home/runner/work/introspection-engine-output/prisma-test-utils/src/static/seed.ts:905:65
    at Generator.next (<anonymous>)
    at /home/runner/work/introspection-engine-output/prisma-test-utils/dist/static/seed.js:8:71
    at new Promise (<anonymous>)
    at __awaiter (/home/runner/work/introspection-engine-output/prisma-test-utils/dist/static/seed.js:4:12)
    at iterate (/home/runner/work/introspection-engine-output/prisma-test-utils/dist/static/seed.js:633:24)
    at /home/runner/work/introspection-engine-output/prisma-test-utils/src/static/seed.ts:947:30
===end seed===
2020-03-11T12:13:09.170Z engine Stopping Prisma engine
2020-03-11T12:13:09.212Z getos { version: 'OpenSSL 1.1.1d  10 Sep 2019\n' }
2020-03-11T12:13:09.212Z getos { ls: '' }
2020-03-11T12:13:09.212Z getos { platform: 'linux', libssl: '1.1.x' }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    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