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

Added scripts for creating tables with logs #797

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

Soctarian
Copy link

@Soctarian Soctarian commented Feb 15, 2022

Added scripts for creating tables with logs. AccountChanges tab can log account ID of user, who disabled or enebled account. Other tabs arent provided with that feature, but have column in db for further adding this functional.
Change tabs were added for accounts, courses, homeworks, student groups and event occurrences.

@@ -36,6 +36,8 @@ public class AccountService : IAccountService
Account user = await _unitOfWork.AccountRepository
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please find more places where account is modified.

@@ -0,0 +1,46 @@
USE `Soft`;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please do dev testing

@@ -0,0 +1,49 @@
USE `Soft`;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please do dev testing

@@ -0,0 +1,51 @@
USE `Soft`;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please do dev testing

@@ -17,5 +17,7 @@ public Course()
public virtual ICollection<MentorOfCourse> MentorsOfCourses { get; set; }

public virtual ICollection<StudentGroup> StudentGroup { get; set; }

public long UpdatedByAccountId { get; set; }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please set property where needed.

@@ -33,7 +33,7 @@ public static void AddServices(this IServiceCollection services, IConfiguration

services.AddHttpClient<IHttpUtil, HttpUtil>(client =>
{
client.BaseAddress = new Uri(configuration.GetSection("Urls:Api:Https").Value);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert

entity.Property(e => e.UpdatedByAccountId)
.IsRequired()
.HasColumnName("UpdatedByAccountId")
.HasDefaultValueSql("1");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove

CREATE TABLE `CoursesChanges` (
`ID` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`CourseID` BIGINT UNSIGNED NOT NULL,
`OldName` TINYINT UNSIGNED DEFAULT NULL,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please set appropriate types

@@ -0,0 +1,46 @@
USE `Soft`;

DROP TABLE IF EXISTS `CoursesChanges`;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please rename courses -> course

`OldIsActive` BIT DEFAULT NULL,
`NewIsActive` BIT DEFAULT NULL,
`QueriedBy` BIGINT UNSIGNED NOT NULL,
`DateTime` DATETIME DEFAULT NOW(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update date

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

develop DB change logs for more tables
2 participants