Skip to content
This repository has been archived by the owner on Jan 31, 2025. It is now read-only.

Commit

Permalink
Merge pull request #36 from sharafdin/tman
Browse files Browse the repository at this point in the history
modified Entity schema name
  • Loading branch information
abdinasir-Tman authored Feb 3, 2024
2 parents d65fcb9 + 10bc941 commit e711aea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const AppDataSource = new DataSource({
type: "mongodb",
url: dbURL,
database: "yonode",
// entities: [User],
entities: ["../entity/**/*.js"],
synchronize: true,
});
AppDataSource.initialize()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { EntitySchema } from "typeorm";

const User = new EntitySchema({
name: "Category", // Will use table name `category` as default behaviour.
tableName: "categories", // Optional: Provide `tableName` property to override the default behaviour for table name.
const schemaName = new EntitySchema({
name: "schemaName", // Will use table name `category` as default behaviour.
tableName: "tableName", // Optional: Provide `tableName` property to override the default behaviour for table name.
columns: {
id: {
primary: true,
Expand All @@ -14,4 +14,4 @@ const User = new EntitySchema({
},
},
});
export default User;
export default schemaName;

0 comments on commit e711aea

Please sign in to comment.