-
Notifications
You must be signed in to change notification settings - Fork 53
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
Refactoring database #251
Merged
Merged
Refactoring database #251
Changes from all commits
Commits
Show all changes
88 commits
Select commit
Hold shift + click to select a range
98d6b16
Initial commit on orphan branch
blidhpxc 0d0fc04
Merge remote-tracking branch 'aasx-server/main'
blidhpxc 7d0b4cc
file error fix
blidhpxc 8ce8359
start
blidhpxc 87b4422
Merge remote-tracking branch 'aasx-server/main'
blidhpxc b969a1d
merge main
blidhpxc 926b000
merge dev
blidhpxc fe7bfc4
Database-schema, Clear, Load
blidhpxc 03d6937
delete
blidhpxc 17b6750
works
blidhpxc 4897703
works
blidhpxc a2d3f87
extrude to seperate files finished
blidhpxc ff54a09
db name change
blidhpxc 3cecd5b
image of db schema changed
blidhpxc f03dd01
blazor changes
blidhpxc 38c36f7
blazor changes
blidhpxc 9525437
delete table config
blidhpxc 3671182
delete num to id
blidhpxc 7db3d80
Identifier changed
blidhpxc db23fc5
outsource of code from page for db
blidhpxc 835e440
fremdschluessel einbau noch nicht fertig
blidhpxc 2fbe953
finish refactoring
blidhpxc 0d4b8a3
bug fix
blidhpxc 11ddf86
bug fix
blidhpxc 35eae17
work on SearchSMEsResult
blidhpxc be61abd
Edit works now
blidhpxc 2740fe0
smal fix
blidhpxc af8a872
smal fix
blidhpxc 81fc166
faster
blidhpxc b22dd70
faster works
blidhpxc 651e594
faster works
blidhpxc 2cc2d72
faster works
blidhpxc 7d6bcd1
Database, not required added
blidhpxc 0007255
Merge remote-tracking branch 'aasx-server/main'
blidhpxc c1a200f
Bug with searchSMEs and countSMEs fixed
blidhpxc 333f90b
Auslagern von SM zu Json
blidhpxc 386d479
Change
blidhpxc a791f0b
Merge remote-tracking branch 'aasx-server/main'
blidhpxc cfdaeff
Merge with main
blidhpxc 943e829
new db image
blidhpxc 343513f
Merge with remote branch
blidhpxc 8dc6a9a
merge
blidhpxc ec71382
Merge with remote branch
blidhpxc 7cb4f99
Merge main
blidhpxc bf01645
API Work started
blidhpxc 02f450b
change start parameters
blidhpxc ff94f5b
Refactoring database
blidhpxc d4895a6
refactoring database
blidhpxc a6f24a9
refactoring database
blidhpxc d22b0d6
refactoring database
blidhpxc 44d17d8
refactoring database
blidhpxc 1874073
merge conflict
blidhpxc 664d944
Resolve merge conflict
blidhpxc 1007d66
start working through comments
blidhpxc 4f9afff
Merge with remote branch
blidhpxc 3477514
Rework SubmodelRepositoryAPIApi
blidhpxc 4a87008
API connection to db
blidhpxc 73506e7
API connection to db
blidhpxc 9f876b9
API connection to db
blidhpxc 6bb1e74
merge
blidhpxc d676ee9
Merge main
blidhpxc 139c4ab
launchSettings.json
blidhpxc a605fee
work through the comments
blidhpxc 97d4ba3
merge with upstream
blidhpxc 96f644e
merge with upstream
blidhpxc 2d9995a
delete old/unused methode
blidhpxc 08d2bd2
merge with main
blidhpxc ff2178d
merge with main
blidhpxc 8216e3f
Merge branch 'main' of https://github.com/blidhpxc/aasx-server
blidhpxc 8314010
Merge branch 'main' of https://github.com/blidhpxc/aasx-server
blidhpxc 18532ae
Merge branch 'main' of https://github.com/blidhpxc/aasx-server
blidhpxc e114b5e
Separate classes
blidhpxc 7eaed2e
launchSettings.json
blidhpxc 90d854e
merge main
blidhpxc 162b13c
merge with local repo
blidhpxc 0ab35a9
merge with local repo
blidhpxc 6c9dd38
merge with local repo
blidhpxc 16dcd92
merge with local repo
blidhpxc aa999d5
Update Edit.cs
blidhpxc 208c5e6
Update Edit.cs
blidhpxc d25d9dc
change to string.IsNullOrEmpty
blidhpxc 47d4519
Merge remote-tracking branch 'aasx-server-db/dev-refactoring'
blidhpxc e3686e2
change to string.IsNullOrEmpty
blidhpxc 1dfbacb
launchSettings.json
blidhpxc 0242fcc
Merge main into database branch
Freezor 2a624e7
Bug fix Search on Page /db/sme?search=
blidhpxc 5b050c7
Bug fix Search on Page /db/sme?search=
blidhpxc 8582bf9
Merge branch 'origin-main' into blidhpxc-main
Freezor File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
{ | ||
"profiles": { | ||
"IIS Express": { | ||
"commandName": "IISExpress", | ||
"commandLineArgs": "--port 51710 --data-path C:\\Develop\\Aasx\\repo --edit --secret-string=123", | ||
"launchBrowser": true, | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
}, | ||
"AasxServerBlazor": { | ||
"commandName": "Project", | ||
"commandLineArgs": "--no-security --secret-string-api 1234 --aasx-in-memory 1000 --data-path \"\\\\wsl.localhost\\Ubuntu\\home\\oze\\plugfest\\aasxs-view\" --edit --external-blazor http://localhost:5001", | ||
"launchBrowser": true, | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development", | ||
"AASREGISTRY": "http://localhost:50001", | ||
"IFRAMEPATH": "https://dpp40-2-v2.industrialdigitaltwin.org/dashboard/submodelViewV3.html" | ||
}, | ||
"applicationUrl": "http://localhost:5001", | ||
"jsWebView2Debugging": true | ||
} | ||
}, | ||
"iisSettings": { | ||
"windowsAuthentication": false, | ||
"anonymousAuthentication": true, | ||
"iisExpress": { | ||
"applicationUrl": "http://localhost:56189", | ||
"sslPort": 0 | ||
} | ||
} | ||
{ | ||
"profiles": { | ||
"IIS Express": { | ||
"commandName": "IISExpress", | ||
"commandLineArgs": "--port 51710 --data-path C:\\Develop\\Aasx\\repo --edit --secret-string=123", | ||
"launchBrowser": true, | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development" | ||
} | ||
}, | ||
"AasxServerBlazor": { | ||
"commandName": "Project", | ||
"commandLineArgs": "--no-security --secret-string-api 1234 --aasx-in-memory 1000 --data-path \"\\\\wsl.localhost\\Ubuntu\\home\\oze\\plugfest\\aasxs-view\" --edit --external-blazor http://localhost:5001", | ||
"launchBrowser": true, | ||
"environmentVariables": { | ||
"ASPNETCORE_ENVIRONMENT": "Development", | ||
"AASREGISTRY": "http://localhost:50001", | ||
"IFRAMEPATH": "https://dpp40-2-v2.industrialdigitaltwin.org/dashboard/submodelViewV3.html" | ||
}, | ||
"applicationUrl": "http://localhost:5001", | ||
"jsWebView2Debugging": true | ||
} | ||
}, | ||
"iisSettings": { | ||
"windowsAuthentication": false, | ||
"anonymousAuthentication": true, | ||
"iisExpress": { | ||
"applicationUrl": "http://localhost:56189", | ||
"sslPort": 0 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
blidhpxc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.1.2" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.5" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.5"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
</PackageReference> | ||
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.13.1" /> | ||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.4" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\AasxCsharpLibrary\AasxCsharpLibrary.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Folder Include="Migrations\" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Microsoft.EntityFrameworkCore; | ||
|
||
/* | ||
* https://learn.microsoft.com/en-us/ef/core/get-started/overview/first-app?tabs=netcore-cli | ||
* | ||
* Initial Migration | ||
* Add-Migration InitialCreate -Context SqliteAasContext -OutputDir Migrations\Sqlite | ||
* Add-Migration InitialCreate -Context PostgreAasContext -OutputDir Migrations\Postgres | ||
* | ||
* Change database | ||
* Add-Migration XXX -Context SqliteAasContext | ||
* Add-Migration XXX -Context PostgreAasContext | ||
* Update-Database -Context SqliteAasContext | ||
* Update-Database -Context PostgreAasContext | ||
*/ | ||
|
||
namespace AasxServerDB.Context | ||
{ | ||
public class PostgreAasContext : AasContext | ||
{ | ||
protected override void OnConfiguring(DbContextOptionsBuilder options) | ||
{ | ||
if (_con == null) | ||
{ | ||
options.UseNpgsql(""); | ||
} | ||
else | ||
{ | ||
var connectionString = _con["DatabaseConnection:ConnectionString"]; | ||
options.UseNpgsql(connectionString); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using Microsoft.EntityFrameworkCore; | ||
|
||
/* | ||
* https://learn.microsoft.com/en-us/ef/core/get-started/overview/first-app?tabs=netcore-cli | ||
* | ||
* Initial Migration | ||
* Add-Migration InitialCreate -Context SqliteAasContext -OutputDir Migrations\Sqlite | ||
* Add-Migration InitialCreate -Context PostgreAasContext -OutputDir Migrations\Postgres | ||
* | ||
* Change database | ||
* Add-Migration XXX -Context SqliteAasContext | ||
* Add-Migration XXX -Context PostgreAasContext | ||
* Update-Database -Context SqliteAasContext | ||
* Update-Database -Context PostgreAasContext | ||
*/ | ||
|
||
namespace AasxServerDB.Context | ||
{ | ||
public class SqliteAasContext : AasContext | ||
{ | ||
protected override void OnConfiguring(DbContextOptionsBuilder options) | ||
{ | ||
if (_con == null) | ||
{ | ||
options.UseSqlite(""); | ||
} | ||
else | ||
{ | ||
var connectionString = _con["DatabaseConnection:ConnectionString"]; | ||
if (connectionString != null && connectionString.Contains("$DATAPATH")) | ||
connectionString = connectionString.Replace("$DATAPATH", _dataPath); | ||
options.UseSqlite(connectionString); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aorzelskiGH can we somehow get these changes out of git?