4

I want to stop sequelize to drop tables this is making difficult for me adding dummy data again again whenever I restart server.

server running on port 3000
Executing (default): DROP TABLE IF EXISTS `teams`;
Executing (default): DROP TABLE IF EXISTS `teams`;
Executing (default): CREATE TABLE IF NOT EXISTS `teams` (`teamId` INTEGER auto_increment , `teamName` VARCHAR(255), `teamEmail` VARCHAR(255), `college` VARCHAR(255), `isPaid` TINYINT(1) NOT NULL DEFAULT false, `isRone` TINYINT(1) NOT NULL DEFAULT false, `isRtwo` TINYINT(1) NOT NULL DEFAULT false, `isRthree` TINYINT(1) NOT NULL DEFAULT false, `isNIT` TINYINT(1) NOT NULL DEFAULT false, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, PRIMARY KEY (`teamId`)) ENGINE=InnoDB;
Executing (default): SHOW INDEX FROM `teams` FROM `startupconclave`
Nice! Database looks fine
0

1 Answer 1

14

Remove {force: true} from your bin/www script in models.sequelize.sync() method.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.