| Author |
Message |
icecurtain
Joined: 18 Jan 2010 Posts: 9
|
Posted: Tue Jan 22, 2013 5:56 pm Post subject: globally set bigint and datetime |
|
|
Hi,
How can I globally set that for all Bigint and datetime data types, the default for all tables the project should be 1 thru 999,999 unique with no null ?
Date time 01-01-1901 00:00 - 01-01-1901 00:00 Randomize Time = false
which Xmls do I need to change?
Thanks, |
|
| Back to top |
|
 |
james.billings
Joined: 16 Jun 2010 Posts: 844 Location: My desk.
|
Posted: Wed Jan 23, 2013 7:23 pm Post subject: |
|
|
The datatypes you describe are built in ones so you can't edit an XML to override them. You can create a new one though, and give it a higher score so it gets picked up. For example the BigInt one could have a file defined as this:
| Code: |
<?xml version="1.0" encoding="iso-8859-1"?>
<generators>
<generator type="RedGate.SQLDataGenerator.Generators.Number.Int64Generator" name="MyBigInt" description="Generates BigInts" category="Generic">
<property name="MinValue">1</property>
<property name="MaxValue">999999</property>
<property name="UseSequence">False</property>
<property name="Unique">True</property>
<property name="ValidateIncrement">1</property>
<property name="NullsAllowed">False</property>
<matches field="." score="999" />
<type type="Int64" />
</generator>
</generators> |
You can create a new file in C:\Program Files (x86)\Red Gate\SQL Data Generator 2\Config and the tool will pick it up. The field name matching takes a regular expression, so a . simply means "anything" - thus all fields with a bigint datatype will use this generator.
You can do a similar process to create other generators too. |
|
| Back to top |
|
 |
icecurtain
Joined: 18 Jan 2010 Posts: 9
|
Posted: Thu Jan 24, 2013 1:58 pm Post subject: |
|
|
| Code: |
<?xml version="1.0" encoding="iso-8859-1"?>
<generators>
<generator
type = "RedGate.SQLDataGenerator.Generators.Number.Int64Generator"
name = "BigInt"
description = "Generates BigInts"
category = "Generic">
<property name = "MinValue">1</property>
<property name = "MaxValue">999999</property>
<property name = "UseSequence">False</property>
<property name = "Unique">True</property>
<property name = "ValidateIncrement">1</property>
<property name = "NullsAllowed">False</property>
<matches field = "." score = "999"/> |
<type type = "bigint"/>
| Code: |
<type type = "Int64"/>
</generator>
</generators> |
works but thanks for the right direction
path = C:\Program Files (x86)\Red Gate\SQL Data Generator 1\Config |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group