using jhipster I have created Angular based Monolith application (MySQL) and loaded jdl file, everything is working fine. But by mistake I have dropped MySQL database schema. Now I have recreated the database schema, but now when I run ./mvnw, it is not creating the database tables and entries any more even the login and authentication tables were also not created? Is there settings change I need to make to recreate the database all the database tables?
Liquibase does not create the schema, it creates tables, indexes, ... but only in a pre-existing database/schema. You must re-create your schema.
You can create schema from liquibase, but not a database, so you must just create database, and for schema you can use this:
<sql> CREATE SCHEMA yourSchema </sql>
Related
I can smoothly connect my MySQL database to Superset and create a table, slice and dashboard, but when I add a new column in the table in MySQL, the table I created in Superset would not change or refresh the schema.
In order to solve the problem, I have to delete the old tables, slice and dashboard and connect again to rebuild them, which doesn't make sense.
Is there any way I can refresh schema in superset when table schema in MySQL is modified?
Superset v. 1.0.0
postgreSQL
when schema is changed, just refreshing the schema in table edit won't add the new columns. You have to click:
I am facing some problem with sequelize while i keep {force: true} . In this case old data dropped and new database is created and my saved data get lost. I want to create new database with old values. Can that possible with sequelize in node.js
When you have database with some data and want to make some changes in db you have two possibilities:
as you said recreate db, but this will drop tables (erase your data).
use migrations (you can read about it here)
Migrations allow you to to don't loose your data and instruct sequelize how to change tables.
There is ticket for recreating tables with alter tables instead of drop tables here
Is there a way to export part of MySQL table definition using phpMyAdmin?
I need to transfer 2 columns from one table to other DB, so I expect 2 "ALTER TABLE" SQL commands to be created.
Currently, there is no built in way to do this, but Schema Sync - a MySQL Schema Versioning and Migration Utility can be used:
Schema Sync will generate the SQL necessary to migrate the schema of a source database to a target database (patch script), as well as a the SQL necessary to undo the changes after you apply them (revert script).
I have two databases one for production and another for staging.
Now I have made many changes in the staging database and I want to make the production the same structure as the testing without dropping any table or losing any data.
I want to find a way where I can create alter table from staging database and apply it on the production database. Note the tables have many columns so I don't want to have to do that manually..
You can use SQLyog trial or SQLyog Community edition, with this tool you be able to apply the changes to the production database using Schema and Data Synchronization feature.
I have restored a DB from "mixed authentication" MS SQL Server into "windows authentication only" SQL Server.
My application is configured for windows authentication which uses 'dbo' for accessing DB.
But in the restored DB , all the tables, views are NOT owned by 'dbo'
Im not really sure if i understood the question, but i guess when you accessing database, you are/was creating the tables. Most possibly your statements was like:
Create Table TableName (...)
To create tables in specific schema, you should add schema prefix (or change the default schema of user you are using):
Create Table dbo.TableName (...)
To move tables to other schema, see Alter Schema.