Skip to content

Commit b0b9241

Browse files
committed
Remove timeseries from postgreSQL database
This functionality has not been used and shoudl thus be removed. In addition, it simplifies an upcoming implementation of postgreSQL database as part of tests.
1 parent 8c24d5d commit b0b9241

13 files changed

+1286
-776
lines changed

backend/api/Controllers/TimeseriesController.cs

Lines changed: 0 additions & 111 deletions
This file was deleted.

backend/api/Database/Context/FlotillaDbContext.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,6 @@ public FlotillaDbContext(DbContextOptions options)
3333
public DbSet<UserInfo> UserInfos => Set<UserInfo>();
3434
public DbSet<TagInspectionMetadata> TagInspectionMetadata => Set<TagInspectionMetadata>();
3535

36-
// Timeseries:
37-
public DbSet<RobotPressureTimeseries> RobotPressureTimeseries =>
38-
Set<RobotPressureTimeseries>();
39-
public DbSet<RobotBatteryTimeseries> RobotBatteryTimeseries =>
40-
Set<RobotBatteryTimeseries>();
41-
public DbSet<RobotPoseTimeseries> RobotPoseTimeseries => Set<RobotPoseTimeseries>();
42-
4336
protected override void OnModelCreating(ModelBuilder modelBuilder)
4437
{
4538
bool isSqlLite = Database.ProviderName == "Microsoft.EntityFrameworkCore.Sqlite";

backend/api/Database/Models/RobotBatteryTimeseries.cs

Lines changed: 0 additions & 12 deletions
This file was deleted.

backend/api/Database/Models/RobotPoseTimeseries.cs

Lines changed: 0 additions & 45 deletions
This file was deleted.

backend/api/Database/Models/RobotPressureTimeseries.cs

Lines changed: 0 additions & 12 deletions
This file was deleted.

backend/api/Database/Models/TimeseriesBase.cs

Lines changed: 0 additions & 17 deletions
This file was deleted.

backend/api/Migrations/20241210093952_Reset-Structure.cs

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ public partial class ResetStructure : Migration
1111
/// <inheritdoc />
1212
protected override void Up(MigrationBuilder migrationBuilder)
1313
{
14-
// MANUALLY ADDED:
15-
// Adding timescale extension to the database
16-
migrationBuilder.Sql("CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;");
17-
//
18-
1914
migrationBuilder.CreateTable(
2015
name: "DefaultLocalizationPoses",
2116
columns: table => new
@@ -70,19 +65,6 @@ protected override void Up(MigrationBuilder migrationBuilder)
7065
table.PrimaryKey("PK_Installations", x => x.Id);
7166
});
7267

73-
migrationBuilder.CreateTable(
74-
name: "RobotBatteryTimeseries",
75-
columns: table => new
76-
{
77-
BatteryLevel = table.Column<float>(type: "real", nullable: false),
78-
Time = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
79-
RobotId = table.Column<string>(type: "text", nullable: false),
80-
MissionId = table.Column<string>(type: "text", nullable: true)
81-
},
82-
constraints: table =>
83-
{
84-
});
85-
8668
migrationBuilder.CreateTable(
8769
name: "RobotModels",
8870
columns: table => new
@@ -100,38 +82,6 @@ protected override void Up(MigrationBuilder migrationBuilder)
10082
table.PrimaryKey("PK_RobotModels", x => x.Id);
10183
});
10284

103-
migrationBuilder.CreateTable(
104-
name: "RobotPoseTimeseries",
105-
columns: table => new
106-
{
107-
PositionX = table.Column<float>(type: "real", nullable: false),
108-
PositionY = table.Column<float>(type: "real", nullable: false),
109-
PositionZ = table.Column<float>(type: "real", nullable: false),
110-
OrientationX = table.Column<float>(type: "real", nullable: false),
111-
OrientationY = table.Column<float>(type: "real", nullable: false),
112-
OrientationZ = table.Column<float>(type: "real", nullable: false),
113-
OrientationW = table.Column<float>(type: "real", nullable: false),
114-
Time = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
115-
RobotId = table.Column<string>(type: "text", nullable: false),
116-
MissionId = table.Column<string>(type: "text", nullable: true)
117-
},
118-
constraints: table =>
119-
{
120-
});
121-
122-
migrationBuilder.CreateTable(
123-
name: "RobotPressureTimeseries",
124-
columns: table => new
125-
{
126-
Pressure = table.Column<float>(type: "real", nullable: false),
127-
Time = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
128-
RobotId = table.Column<string>(type: "text", nullable: false),
129-
MissionId = table.Column<string>(type: "text", nullable: true)
130-
},
131-
constraints: table =>
132-
{
133-
});
134-
13585
migrationBuilder.CreateTable(
13686
name: "Sources",
13787
columns: table => new

0 commit comments

Comments
 (0)