Skip to content
This repository has been archived by the owner on Aug 10, 2018. It is now read-only.

Bug 1030958 - Add process to add remo events #51

Merged
merged 1 commit into from
Jul 8, 2014

Conversation

k88hudson
Copy link
Contributor

No description provided.

@@ -0,0 +1,4 @@
ALTER TABLE `Events`
ADD COLUMN `externalSource` VARCHAR(255) DEFAULT NULL;
ADD COLUMN `url` VARCHAR(255) DEFAULT NULL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we just use registerLink or is that a bad idea?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better not to, considering it would require more logic on the front end

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think we may deprecate it too...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was hoping someone would say "deprecate registerLink"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to do that, we should take it out in the UI

@cadecairos
Copy link
Contributor

I get an error running import-remo-events.js:

Error: ER_BAD_FIELD_ERROR: Unknown column 'isEmailPublic' in 'field list'
    at Query.Sequence._packetToError (/home/cade/repos/events/webmaker-events-service/node_modules/mysql/lib/protocol/sequences/Sequence.js:30:14)
    at Query.ErrorPacket (/home/cade/repos/events/webmaker-events-service/node_modules/mysql/lib/protocol/sequences/Query.js:82:18)
    at Protocol._parsePacket (/home/cade/repos/events/webmaker-events-service/node_modules/mysql/lib/protocol/Protocol.js:202:24)
    at Parser.write (/home/cade/repos/events/webmaker-events-service/node_modules/mysql/lib/protocol/Parser.js:62:12)
    at Protocol.write (/home/cade/repos/events/webmaker-events-service/node_modules/mysql/lib/protocol/Protocol.js:37:16)
    at Socket.<anonymous> (/home/cade/repos/events/webmaker-events-service/node_modules/mysql/lib/Connection.js:72:28)
    at Socket.emit (events.js:95:17)
    at Socket.<anonymous> (_stream_readable.js:748:14)
    at Socket.emit (events.js:92:17)
    at emitReadable_ (_stream_readable.js:410:10)
    --------------------
    at Protocol._enqueue (/home/cade/repos/events/webmaker-events-service/node_modules/mysql/lib/protocol/Protocol.js:110:26)
    at Connection.query (/home/cade/repos/events/webmaker-events-service/node_modules/mysql/lib/Connection.js:165:25)
    at module.exports.Query.run (/home/cade/repos/events/webmaker-events-service/node_modules/sequelize/lib/dialects/mysql/query.js:26:17)
    at Function.<anonymous> (/home/cade/repos/events/webmaker-events-service/node_modules/sequelize/lib/dialects/mysql/connector-manager.js:410:23)
    at null.<anonymous> (/home/cade/repos/events/webmaker-events-service/node_modules/sequelize/lib/emitters/custom-event-emitter.js:105:15)
    at emit (events.js:95:17)
    at module.exports.CustomEventEmitter.emit (/home/cade/repos/events/webmaker-events-service/node_modules/sequelize/lib/emitters/custom-event-emitter.js:61:33)
    at /home/cade/repos/events/webmaker-events-service/node_modules/sequelize/lib/dialects/mysql/connector-manager.js:245:19
    at dispense (/home/cade/repos/events/webmaker-events-service/node_modules/sequelize/node_modules/generic-pool/lib/generic-pool.js:247:16)
    at Object.me.acquire (/home/cade/repos/events/webmaker-events-service/node_modules/sequelize/node_modules/generic-pool/lib/generic-pool.js:316:5

edit: fyi - I had run the migration script. I deleted and recreated my events table, and the import went smoothly.

.bulkCreate(events, {transaction: t})
.success(function() {
t.commit().success(function() {
console.log(events);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we probably don't need to log all the events. maybe just a "completed" message.
also, end the script with a success code process.exit(0);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call

k88hudson added a commit that referenced this pull request Jul 8, 2014
Bug 1030958 - Add process to add remo events
@k88hudson k88hudson merged commit 6ad7466 into mozilla:master Jul 8, 2014
@k88hudson k88hudson deleted the 1030958 branch July 8, 2014 18:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants