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

Oqtane.Migrations -> Oqtane.Database.Migrations #1356

Closed
wants to merge 2 commits into from

Conversation

hishamco
Copy link
Contributor

@hishamco hishamco commented May 16, 2021

@cnurse just moved Migrations to proper namespace which is make sense while the migrations are database related. I tested a new installation after this change to make sure nothing is broken

@sbwalker
Copy link
Member

@hishamco this looks fine to me... but I will let @cnurse weigh in before I merge

@cnurse
Copy link
Contributor

cnurse commented May 20, 2021

The first commit (Interfaces) I believe will be superceded by my bigger PR which converts database projects to build to installable packages per @sbwalker.
I am not sure about the second commit. If all you are doing is changing the namespace then I disagree as the Namespace will no longer map to the folder structure, which is a Best Practise.

@sbwalker
Copy link
Member

@hishamco I am going to close this as it appears #1383 replaces it

@sbwalker sbwalker closed this May 20, 2021
@hishamco
Copy link
Contributor Author

hishamco commented Jun 4, 2021

I revise the new updates? the migrations are still on its own namespace not Database one

@sbwalker
Copy link
Member

sbwalker commented Jun 4, 2021

I would prefer to leave the namespaces as is

@hishamco
Copy link
Contributor Author

hishamco commented Jun 4, 2021

Ok, one more thing why there's a dependency on Sqlite on the server projects, are there some changes last few weeks?

@hishamco
Copy link
Contributor Author

hishamco commented Jun 4, 2021

FYI I'm unable to install Oqtane, "Value cannot be null. (Parameter 'type')" show up?

@sbwalker
Copy link
Member

sbwalker commented Jun 4, 2021

@hishamco install on which database? You are sure your appsettings.json is in the correct form? There have been a lot of changes to appsettings.json for 2.1

@hishamco
Copy link
Contributor Author

hishamco commented Jun 4, 2021

{
  "Runtime": "Server",
  "Database": {
    "DefaultDBType": "Oqtane.Database.SqlServer.SqlServerDatabase, Oqtane.Database.SqlServer"
  },
  "ConnectionStrings": {
    "DefaultConnection": ""
  },
  "Installation": {
    "DefaultAlias": "",
    "HostPassword": "",
    "HostEmail": "",
    "SiteTemplate": "",
    "DefaultTheme": "",
    "DefaultContainer": ""
  },
  "Localization": {
    "DefaultCulture": "en"
  },
  "AvailableDatabases": [
    {
      "Name": "LocalDB",
      "ControlType": "Oqtane.Installer.Controls.LocalDBConfig, Oqtane.Client",
      "DBType": "Oqtane.Database.SqlServer.SqlServerDatabase, Oqtane.Database.SqlServer"
    },
    {
      "Name": "SQL Server",
      "ControlType": "Oqtane.Installer.Controls.SqlServerConfig, Oqtane.Client",
      "DBType": "Oqtane.Database.SqlServer.SqlServerDatabase, Oqtane.Database.SqlServer"
    },
    {
      "Name": "SQLite",
      "ControlType": "Oqtane.Installer.Controls.SqliteConfig, Oqtane.Client",
      "DBType": "Oqtane.Database.Sqlite.SqliteDatabase, Oqtane.Database.Sqlite"
    },
    {
      "Name": "MySQL",
      "ControlType": "Oqtane.Installer.Controls.MySQLConfig, Oqtane.Client",
      "DBType": "Oqtane.Database.MySQL.MySQLDatabase, Oqtane.Database.MySQL"
    },
    {
      "Name": "PostgreSQL",
      "ControlType": "Oqtane.Installer.Controls.PostgreSQLConfig, Oqtane.Client",
      "DBType": "Oqtane.Database.PostgreSQL.PostgreSQLDatabase, Oqtane.Database.PostgreSQL"
    }
  ]
}

I didn't change anything

@sbwalker
Copy link
Member

sbwalker commented Jun 4, 2021

The only thing which seems to be missing is:

"RenderMode": "ServerPrerendered",

@hishamco
Copy link
Contributor Author

hishamco commented Jun 4, 2021

Same thing, I will try to git fetch again

@hishamco hishamco deleted the database-migrations branch June 4, 2021 13:50
@sbwalker
Copy link
Member

sbwalker commented Jun 4, 2021

Good question about the SQLite dependency - I will follow up with cnurse. I just tried an install on LocalDB with the latest dev branch and it worked fine.

@hishamco
Copy link
Contributor Author

hishamco commented Jun 4, 2021

Last thing seems the data providers project have been removed, so where can I find the implementation for them?

@sbwalker
Copy link
Member

sbwalker commented Jun 4, 2021

There is a Oqtane.Databases.sln which contains all the database projects. The repo contains all of the data providers in the same location as previously.

@hishamco
Copy link
Contributor Author

hishamco commented Jun 4, 2021

The repo contains all of the data providers in the same location as previously.

Could you please point me to the repo?

@sbwalker
Copy link
Member

sbwalker commented Jun 4, 2021

they are in the main repo: https://github.com/oqtane/oqtane.framework you can see the folders for Oqtane.Database.MySQL, Oqtane.Database.PostgreSQL, etc...

@hishamco
Copy link
Contributor Author

hishamco commented Jun 4, 2021

Seems the internet issue causes some git issue the repo still not fetched totally .. thanks a lot

@sbwalker
Copy link
Member

sbwalker commented Jun 4, 2021

To answer the question on SQLite...

SQLite has "runtimes" dependencies which are not loaded automatically by the AssemblyLoadContext Load methods. This is a known issue see:

dotnet/runtime#13015
dotnet/runtime#3660
dotnet/runtime#3659

The simplest solution for this problem was to add a Nuget Package reference to Oqtane.Server to ensure that the dependency graph is correct. The downside is that Sqlite “core” components are always deployed to the /bin whether or not they are actually used - but this is an acceptable compromise in order to enable this database.

@hishamco
Copy link
Contributor Author

hishamco commented Jun 4, 2021

Are other database providers loaded on demand?

@sbwalker
Copy link
Member

sbwalker commented Jun 4, 2021

Yes, all database providers are deployed and loaded on demand.

@hishamco
Copy link
Contributor Author

hishamco commented Jun 4, 2021

Strange!! I will have a look to SQLite and see why it can't be loaded

@sbwalker
Copy link
Member

sbwalker commented Jun 4, 2021

I am not concerned about this... I am fine releasing 2.1 with this configuration.

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.

3 participants