Browse Source

fix table name

push-params
Evan Feenstra 4 years ago
parent
commit
d7dbd634f9
  1. 2
      api/models/index.ts
  2. 2
      api/models/ts/chatBot.ts
  3. 2
      dist/api/models/index.js
  4. 2
      dist/api/models/index.js.map
  5. 2
      dist/api/models/ts/chatBot.js
  6. 2
      dist/api/models/ts/chatBot.js.map

2
api/models/index.ts

@ -17,7 +17,7 @@ const config = require(path.join(__dirname,'../../config/config.json'))[env]
const sequelize = new Sequelize({ const sequelize = new Sequelize({
...config, ...config,
logging: console.log,//process.env.SQL_LOG==='true' ? console.log : false, logging: process.env.SQL_LOG==='true' ? console.log : false,
models: [Chat,Contact,Invite,Message,Subscription,MediaKey,ChatMember,Timer,Bot,ChatBot,BotMember] models: [Chat,Contact,Invite,Message,Subscription,MediaKey,ChatMember,Timer,Bot,ChatBot,BotMember]
}) })
const models = sequelize.models const models = sequelize.models

2
api/models/ts/chatBot.ts

@ -4,7 +4,7 @@ import { Table, Column, Model } from 'sequelize-typescript';
TRIBE OWNER - bots installed as "contacts" in a tribe TRIBE OWNER - bots installed as "contacts" in a tribe
*/ */
@Table({tableName: 'sphinx_chat_members', underscored: true, indexes:[ @Table({tableName: 'sphinx_chat_bots', underscored: true, indexes:[
{unique:true, fields:['chat_id','bot_uuid']} {unique:true, fields:['chat_id','bot_uuid']}
]}) ]})
export default class ChatBot extends Model<ChatBot> { export default class ChatBot extends Model<ChatBot> {

2
dist/api/models/index.js

@ -15,7 +15,7 @@ const chatBot_1 = require("./ts/chatBot");
const botMember_1 = require("./ts/botMember"); const botMember_1 = require("./ts/botMember");
const env = process.env.NODE_ENV || 'development'; const env = process.env.NODE_ENV || 'development';
const config = require(path.join(__dirname, '../../config/config.json'))[env]; const config = require(path.join(__dirname, '../../config/config.json'))[env];
const sequelize = new sequelize_typescript_1.Sequelize(Object.assign(Object.assign({}, config), { logging: console.log, models: [chat_1.default, contact_1.default, invite_1.default, message_1.default, subscription_1.default, mediaKey_1.default, chatMember_1.default, timer_1.default, bot_1.default, chatBot_1.default, botMember_1.default] })); const sequelize = new sequelize_typescript_1.Sequelize(Object.assign(Object.assign({}, config), { logging: process.env.SQL_LOG === 'true' ? console.log : false, models: [chat_1.default, contact_1.default, invite_1.default, message_1.default, subscription_1.default, mediaKey_1.default, chatMember_1.default, timer_1.default, bot_1.default, chatBot_1.default, botMember_1.default] }));
exports.sequelize = sequelize; exports.sequelize = sequelize;
const models = sequelize.models; const models = sequelize.models;
exports.models = models; exports.models = models;

2
dist/api/models/index.js.map

@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../api/models/index.ts"],"names":[],"mappings":";;AAAA,+DAA+C;AAC/C,6BAA4B;AAC5B,oCAA4B;AAC5B,0CAAkC;AAClC,wCAAgC;AAChC,0CAAkC;AAClC,oDAA4C;AAC5C,4CAAoC;AACpC,gDAAwC;AACxC,sCAA8B;AAC9B,kCAA0B;AAC1B,0CAAkC;AAClC,8CAAsC;AAEtC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;AAClD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,0BAA0B,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;AAE5E,MAAM,SAAS,GAAG,IAAI,gCAAS,iCAC1B,MAAM,KACT,OAAO,EAAE,OAAO,CAAC,GAAG,EACpB,MAAM,EAAE,CAAC,cAAI,EAAC,iBAAO,EAAC,gBAAM,EAAC,iBAAO,EAAC,sBAAY,EAAC,kBAAQ,EAAC,oBAAU,EAAC,eAAK,EAAC,aAAG,EAAC,iBAAO,EAAC,mBAAS,CAAC,IAClG,CAAA;AAIA,8BAAS;AAHX,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,CAAA;AAI7B,wBAAM"} {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../api/models/index.ts"],"names":[],"mappings":";;AAAA,+DAA+C;AAC/C,6BAA4B;AAC5B,oCAA4B;AAC5B,0CAAkC;AAClC,wCAAgC;AAChC,0CAAkC;AAClC,oDAA4C;AAC5C,4CAAoC;AACpC,gDAAwC;AACxC,sCAA8B;AAC9B,kCAA0B;AAC1B,0CAAkC;AAClC,8CAAsC;AAEtC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;AAClD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,0BAA0B,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;AAE5E,MAAM,SAAS,GAAG,IAAI,gCAAS,iCAC1B,MAAM,KACT,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,KAAG,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAC3D,MAAM,EAAE,CAAC,cAAI,EAAC,iBAAO,EAAC,gBAAM,EAAC,iBAAO,EAAC,sBAAY,EAAC,kBAAQ,EAAC,oBAAU,EAAC,eAAK,EAAC,aAAG,EAAC,iBAAO,EAAC,mBAAS,CAAC,IAClG,CAAA;AAIA,8BAAS;AAHX,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,CAAA;AAI7B,wBAAM"}

2
dist/api/models/ts/chatBot.js

@ -48,7 +48,7 @@ __decorate([
__metadata("design:type", Date) __metadata("design:type", Date)
], ChatBot.prototype, "updatedAt", void 0); ], ChatBot.prototype, "updatedAt", void 0);
ChatBot = __decorate([ ChatBot = __decorate([
sequelize_typescript_1.Table({ tableName: 'sphinx_chat_members', underscored: true, indexes: [ sequelize_typescript_1.Table({ tableName: 'sphinx_chat_bots', underscored: true, indexes: [
{ unique: true, fields: ['chat_id', 'bot_uuid'] } { unique: true, fields: ['chat_id', 'bot_uuid'] }
] }) ] })
], ChatBot); ], ChatBot);

2
dist/api/models/ts/chatBot.js.map

@ -1 +1 @@
{"version":3,"file":"chatBot.js","sourceRoot":"","sources":["../../../../api/models/ts/chatBot.ts"],"names":[],"m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