gtfs 4.15.7 → 4.15.8

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.
@@ -2524,7 +2524,7 @@ var tripUpdates = {
2524
2524
  extension: "gtfs-realtime",
2525
2525
  schema: [
2526
2526
  {
2527
- name: "update_id",
2527
+ name: "id",
2528
2528
  type: "text",
2529
2529
  required: true,
2530
2530
  primary: true,
@@ -2688,7 +2688,7 @@ var vehiclePositions = {
2688
2688
  extension: "gtfs-realtime",
2689
2689
  schema: [
2690
2690
  {
2691
- name: "update_id",
2691
+ name: "id",
2692
2692
  type: "text",
2693
2693
  required: true,
2694
2694
  primary: true,
@@ -2927,17 +2927,12 @@ var deadheadTimes = {
2927
2927
  nonstandard: true,
2928
2928
  extension: "ods",
2929
2929
  schema: [
2930
- {
2931
- name: "id",
2932
- type: "integer",
2933
- primary: true,
2934
- prefix: true
2935
- },
2936
2930
  {
2937
2931
  name: "deadhead_id",
2938
2932
  type: "text",
2939
2933
  required: true,
2940
2934
  index: true,
2935
+ primary: true,
2941
2936
  prefix: true
2942
2937
  },
2943
2938
  {
@@ -2974,6 +2969,7 @@ var deadheadTimes = {
2974
2969
  name: "location_sequence",
2975
2970
  type: "integer",
2976
2971
  required: true,
2972
+ primary: true,
2977
2973
  min: 0,
2978
2974
  index: true
2979
2975
  },
@@ -3784,12 +3780,11 @@ var importGtfsFiles = (db, task) => mapSeries2(
3784
3780
  return;
3785
3781
  }
3786
3782
  task.log(`Importing - ${filename}\r`);
3787
- const columns = model.schema.filter((column) => column.name !== "id");
3788
- const placeholder = columns.map(({ name }) => `@${name}`).join(", ");
3783
+ const placeholder = model.schema.map(({ name }) => `@${name}`).join(", ");
3789
3784
  const prefixedColumns = new Set(
3790
- columns.filter((col) => col.prefix).map((col) => col.name)
3785
+ model.schema.filter((column) => column.prefix).map((column) => column.name)
3791
3786
  );
3792
- const prepareStatement = `INSERT ${task.ignoreDuplicates ? "OR IGNORE" : ""} INTO ${model.filenameBase} (${columns.map((column) => column.name).join(", ")}) VALUES (${placeholder})`;
3787
+ const prepareStatement = `INSERT ${task.ignoreDuplicates ? "OR IGNORE" : ""} INTO ${model.filenameBase} (${model.schema.map((column) => column.name).join(", ")}) VALUES (${placeholder})`;
3793
3788
  const insert = db.prepare(prepareStatement);
3794
3789
  const insertLines = db.transaction((lines) => {
3795
3790
  for (const [rowNumber, line] of Object.entries(lines)) {