Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor of scripts/import-tests #291

Merged
merged 8 commits into from
May 18, 2021
3 changes: 2 additions & 1 deletion server/migrations/pg_dump_2021_05_new_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ CREATE TABLE public."TestPlan" (
title text,
"publishStatus" text,
revision text,
"sourceGitCommit" text,
"sourceGitCommitHash" text,
"sourceGitCommitMessage" text,
"exampleUrl" text,
"createdAt" timestamp with time zone,
"parsedTest" jsonb
Expand Down
7 changes: 3 additions & 4 deletions server/models/TestPlan.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ module.exports = function(sequelize, DataTypes) {
},
title: { type: DataTypes.TEXT },
publishStatus: { type: DataTypes.TEXT },
revision: { type: DataTypes.TEXT },
sourceGitCommit: { type: DataTypes.TEXT },
revision: { type: DataTypes.TEXT }, // for semver-ed git tags from the imported test plan
sourceGitCommitHash: { type: DataTypes.TEXT },
sourceGitCommitMessage: { type: DataTypes.TEXT },
exampleUrl: { type: DataTypes.TEXT },
createdAt: {
type: DataTypes.DATE,
Expand All @@ -27,7 +28,5 @@ module.exports = function(sequelize, DataTypes) {
}
);

Model.associate = function(models) {};

return Model;
};
6 changes: 1 addition & 5 deletions server/models/UserRoles.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const MODEL_NAME = 'UserRoles';

module.exports = function(sequelize, DataTypes) {
const Model = sequelize.define(
return sequelize.define(
MODEL_NAME,
{
userId: {
Expand All @@ -27,8 +27,4 @@ module.exports = function(sequelize, DataTypes) {
tableName: MODEL_NAME
}
);

Model.associate = function(models) {};

return Model;
};
Loading