Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 03 11:59
    stale[bot] closed #671
  • Apr 02 16:50
    confuser synchronize #678
  • Apr 02 16:47
    confuser opened #678
  • Apr 02 11:11
    wzrdtales commented #674
  • Apr 02 06:40
    BorntraegerMarc commented #674
  • Mar 31 15:05
    paulmiller3000 commented #676
  • Mar 31 15:03
    paulmiller3000 closed #676
  • Mar 31 15:03
    paulmiller3000 commented #676
  • Mar 31 14:58
    paulmiller3000 commented #676
  • Mar 31 14:54
    paulmiller3000 edited #676
  • Mar 31 14:54
    paulmiller3000 edited #676
  • Mar 31 14:44
    JoaquinDelPrado edited #677
  • Mar 31 14:44
    JoaquinDelPrado edited #677
  • Mar 31 14:44
    JoaquinDelPrado opened #677
  • Mar 31 07:23
    stale[bot] unlabeled #672
  • Mar 31 07:23
    aprilmintacpineda commented #672
  • Mar 31 05:36
    stale[bot] labeled #672
  • Mar 31 05:36
    stale[bot] commented #672
  • Mar 30 21:33
    paulmiller3000 edited #676
  • Mar 30 21:33
    paulmiller3000 edited #676
Nicholas Iannone
@nickiannone
For the second, I think the correct answer is have the "db-migrate" typings def cover the union of node-db-migrate and db-migrate-base, which matches what npm install db-migrate gives you.
but I'd like to hear your thoughts.
Tobias Gurtzick
@wzrdtales
@nickiannone db-migrate-base is used by all other drivers also, it depends on what you want to offer to the user on which level.
Nicholas Iannone
@nickiannone
I'm trying to expose TS typings for the actual migration files produced by db-migrate create.
Tobias Gurtzick
@wzrdtales
ok, so you just want TS for migrations and nothing else?
Nicholas Iannone
@nickiannone
I also want to see if I can fork node-db-migrate and give it a --typescript-file CL flag or something, to get it to spit out TS instead of raw JS or Coffee
uh, essentially, yeah
Others more invested than I are free to port the rest of db-migrate to be bound as a TS library
but I'm just interested in getting our migrations to use TS, like the rest of our codebase
Tobias Gurtzick
@wzrdtales
ok, I'm not that deep into typescript yet, but certainly it would be possible to get such a feature into db-migrate. There is currently also a request open for the babel transpiler to use es6/7 in migrations and I recently decided to give support back to the community by providing a plugin system for db-migrate for exactly things like what you currently do.
Also take a look here db-migrate/node-db-migrate#388 and here db-migrate/node-db-migrate#396
As you just want ts migrations that should be fine though, rewriting all of db-migrate into typescript would be another thing and that would be definitely subject to discussion.
Nicholas Iannone
@nickiannone
I'm not imagining anything like that; the nice thing about TS is that you can just make a definitions file for existing JS, and expose that + a JS module
and they can (and usually are) maintained separate but parallel.
Look at DefinitelyTyped/DefinitelyTyped on GH
I just put out a TS definitions file for two other libraries (twilio and winston-dynamodb) over the past week and a half
Tobias Gurtzick
@wzrdtales
yeah already seen it, also that it seems a bit unmaintainable to have so many definitions in just one repository, there is quite a lot in there.I definitely need to give TS a read, wanted to do that sometime anyway, maybe now is a good time :)
Nicholas Iannone
@nickiannone
I've been sold on it since I realized it lets me use Intellisense in VS Code :D
Tobias Gurtzick
@wzrdtales
I mostely use ternjs for that
Nicholas Iannone
@nickiannone
I used tern in eclipse, and it kept choking on ES6 stuff
after like a week on this project, it just stopped working altogether for our codebase
Tobias Gurtzick
@wzrdtales
that could be true, but in case of node not that big of a problem yet. at least not for the stuff of es6 that is supported in node natively yet.
Nicholas Iannone
@nickiannone
mhm
I think it's more a damning of Eclipse than of tern
Tobias Gurtzick
@wzrdtales
could be, I'm not a fan of IDEs anyway
mostly switching around emacs,vim,atom and sublime and the OS + lots of automation is doing the rest
Nicholas Iannone
@nickiannone
neither am I, outside of VSCode. Heading to lunch, will resume discussion later
Tobias Gurtzick
@wzrdtales
alright, feel free to reach out. have a good one.
Anthony Stansbridge
@Stansbridge
Hey... I was wondering how I actually make a seed?
The docs kinda gloss over it...
I tried making a seed scope, but I am clearly using it wrong since I get a WARN about a derecated feature and to use controlled seeds
I can't find how to create a controlled seed and any examples of a seed
Anthony Stansbridge
@Stansbridge
I am using db-migrate 0.10.0-beta.15
Oh shit, it looks like it's not implemented yet?
Eh
I am utterly confused
Tobias Gurtzick
@wzrdtales
@Stansbridge That is correct it is partially implemented, and the docs are going to be updated next. seeds have been postponed to a later version, to get v0.10.x released. After v0.10.x db-migrate also changes the way of doing releases though. sry for the confusion, just ignore seeders for now.
Anthony Stansbridge
@Stansbridge
@wzrdtales Thanks! Thanks for your open source work. It's appreciated.
Nicholas Iannone
@nickiannone
Hey @wzrdtales, DefinitelyTyped accepted my Typescript defs for db-migrate-base and db-migrate-pg, which we're trying to integrate into our workflow.
I'm looking into two more things: Integrating db-migrate as a component in gulp (which might be another short github project on my end), and getting db-migrate binary to spit out a Typescript file. That one might just be an experimental branch on our end, since there'd be a bit more involved than taking the db-migrate create command and modifying its output. For one, it'd need to know what driver the DB uses so it can load the appropriate plugin
ie. if the database.json file indicates a driver type of "pg", then it'd have to slap in a import * as DbMigratePg from 'db-migrate-pg' into the migration file.
Nicholas Iannone
@nickiannone
and then modify the type of db in export function up(db) and export function down(db) to match
Tobias Gurtzick
@wzrdtales
@nickiannone Ok, cool. Let me know if you need anything, very basic plugin support has also been added, needs more hooks to be actually useful. Next topic is the transition assitent and documentations
@wallyuva I have taken your question about how to use yaml by the way. It is the first example plugin that is indeed also a real plugin that is functional. You can see this here: https://github.com/db-migrate/plugin-yaml As soon as the latest changes are released which needs the transition helper first b/c of a breaking change that occured in the latest changes, this will be available.
Alla Abramova
@movadee
Hi guys! Doing some research. Wonder if there is any sample project repo of using db-migrate to migrate from mongo to postres?
Nenad Kostic
@nkostic
Hi Guys I have issue when adding create function in raw sql file. THe script works fine when i run it on mysql server but when I use dg-migrate I get :[ERROR] Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DELIMITER //
CREATE FUNCTION
I am using the lates bersion of db-migrate and mysql driver
Abraham
@apolishch
is there any way way to add SSL to the migrations_config.js file?